fn process(&mut self, buffer: &mut AudioBuffer<f32>) {
        // Read the amplitude from the parameter object
        let amplitude = self.params.amplitude.get();
        // First, we destructure our audio buffer into an arbitrary number of
        // input and output buffers.  Usually, we'll be dealing with stereo (2 of each)
        // but that might change.
        for (input_buffer, output_buffer) in buffer.zip() {
            // Next, we'll loop through each individual sample so we can apply the amplitude
            // value to it.
            for (input_sample, output_sample) in input_buffer.iter().zip(output_buffer) {
                *output_sample = *input_sample * amplitude;
            }
        }
    }
// Here is where the bulk of our audio processing code goes.
Here is where the bulk of our audio processing code goes.
Here is where the bulk of our audio processing code goes .
fn process(&mut self, buffer: &mut AudioBuffer<f32>) {
        // Read the amplitude from the parameter object
        let amplitude = self.params.amplitude.get();
        // First, we destructure our audio buffer into an arbitrary number of
        // input and output buffers.  Usually, we'll be dealing with stereo (2 of each)
        // but that might change.
        for (input_buffer, output_buffer) in buffer.zip() {
            // Next, we'll loop through each individual sample so we can apply the amplitude
            // value to it.
            for (input_sample, output_sample) in input_buffer.iter().zip(output_buffer) {
                *output_sample = *input_sample * amplitude;
            }
        }
    }
fn process ( & mut self , buffer : & mut AudioBuffer < f32 > ) { // Read the amplitude from the parameter object let amplitude = self . params . amplitude . get ( ) ; // First, we destructure our audio buffer into an arbitrary number of // input and output buffers.  Usually, we'll be dealing with stereo (2 of each) // but that might change. for ( input_buffer , output_buffer ) in buffer . zip ( ) { // Next, we'll loop through each individual sample so we can apply the amplitude // value to it. for ( input_sample , output_sample ) in input_buffer . iter ( ) . zip ( output_buffer ) { * output_sample = * input_sample * amplitude ; } } }
Here is where the bulk of our audio processing code goes.
Here is where the bulk of our audio processing code goes .
&mut self
buffer
&mut AudioBuffer<f32>
&mut self
buffer
&mut AudioBuffer<f32>