diff --git a/plugins/examples/gain-gui/src/lib.rs b/plugins/examples/gain-gui/src/lib.rs index affcf618..541659b9 100644 --- a/plugins/examples/gain-gui/src/lib.rs +++ b/plugins/examples/gain-gui/src/lib.rs @@ -163,12 +163,12 @@ impl Plugin for Gain { buffer: &mut Buffer, _context: &mut impl ProcessContext, ) -> ProcessStatus { - for samples in buffer.iter_mut() { + for channel_samples in buffer.iter_mut() { let mut amplitude = 0.0; - let num_samples = samples.len(); + let num_samples = channel_samples.len(); let gain = self.params.gain.smoothed.next(); - for sample in samples { + for sample in channel_samples { *sample *= util::db_to_gain(gain); amplitude += *sample; } diff --git a/plugins/examples/gain/src/lib.rs b/plugins/examples/gain/src/lib.rs index c8c9a3be..a4da36ec 100644 --- a/plugins/examples/gain/src/lib.rs +++ b/plugins/examples/gain/src/lib.rs @@ -139,11 +139,11 @@ impl Plugin for Gain { buffer: &mut Buffer, _context: &mut impl ProcessContext, ) -> ProcessStatus { - for samples in buffer.iter_mut() { + for channel_samples in buffer.iter_mut() { // Smoothing is optionally built into the parameters themselves let gain = self.params.gain.smoothed.next(); - for sample in samples { + for sample in channel_samples { *sample *= util::db_to_gain(gain); } } diff --git a/plugins/examples/sine/src/lib.rs b/plugins/examples/sine/src/lib.rs index 3ef7d6fd..d5079f4b 100644 --- a/plugins/examples/sine/src/lib.rs +++ b/plugins/examples/sine/src/lib.rs @@ -134,7 +134,7 @@ impl Plugin for Sine { fn process(&mut self, buffer: &mut Buffer, context: &mut impl ProcessContext) -> ProcessStatus { let mut next_event = context.next_midi_event(); - for (sample_id, samples) in buffer.iter_mut().enumerate() { + for (sample_id, channel_samples) in buffer.iter_mut().enumerate() { // Smoothing is optionally built into the parameters themselves let gain = self.params.gain.smoothed.next(); @@ -167,7 +167,7 @@ impl Plugin for Sine { self.calculate_sine(frequency) }; - for sample in samples { + for sample in channel_samples { *sample = sine * util::db_to_gain(gain); } }