From 36ee1d9199ab92541de81bbcf733336d7416d272 Mon Sep 17 00:00:00 2001 From: Pieter Penninckx Date: Sat, 2 Nov 2019 16:13:17 +0100 Subject: [PATCH] Fix #73 --- examples/sine_synth.rs | 2 +- src/buffer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/sine_synth.rs b/examples/sine_synth.rs index 09eb3572..29e87aff 100644 --- a/examples/sine_synth.rs +++ b/examples/sine_synth.rs @@ -111,7 +111,7 @@ impl Plugin for SineSynth { fn process(&mut self, buffer: &mut AudioBuffer) { let samples = buffer.samples(); - let (_, outputs) = buffer.split(); + let (_, mut outputs) = buffer.split(); let output_count = outputs.len(); let per_sample = self.time_per_sample(); let mut output_sample; diff --git a/src/buffer.rs b/src/buffer.rs index fe0ec0b8..6a39a862 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -226,7 +226,7 @@ impl<'a, T> Outputs<'a, T> { } /// Mutably access channel at the given index, unchecked - pub fn get_mut(&self, i: usize) -> &'a mut [T] { + pub fn get_mut(&mut self, i: usize) -> &'a mut [T] { unsafe { slice::from_raw_parts_mut(self.bufs[i], self.samples) } }