# HG changeset patch # User Giulio Moro # Date 1466728825 -3600 # Node ID 58652b93ef7e6164395a9f0639edf46b6ac4341f # Parent b97fe1dc42780368102ad4c304bde22734c4b042 Converted some spaces to tabs diff -r b97fe1dc4278 -r 58652b93ef7e examples/04-Audio/tremolo/render.cpp --- a/examples/04-Audio/tremolo/render.cpp Thu Jun 23 21:24:45 2016 +0100 +++ b/examples/04-Audio/tremolo/render.cpp Fri Jun 24 01:40:25 2016 +0100 @@ -41,7 +41,7 @@ { // Nested for loops for audio channels for(unsigned int n = 0; n < context->audioFrames; n++) { - + // Generate a sinewave with frequency set by gFrequency // and amplitude from -0.5 to 0.5 float lfo = sinf(gPhase) * 0.5; @@ -51,11 +51,10 @@ gPhase -= 2.0 * M_PI; for(unsigned int channel = 0; channel < context->audioChannels; channel++) { - // Read the audio input and half the amplitude - float input = audioRead(context, n, channel) * 0.5; + // Read the audio input and half the amplitude + float input = audioRead(context, n, channel) * 0.5; // Write to audio output the audio input multiplied by the sinewave audioWrite(context, n, channel, (input*lfo)); - } } @@ -65,7 +64,6 @@ // Read analog channel 0 and map the range from 0-1 to 0.25-20 // use this to set the value of gFrequency gFrequency = map(analogRead(context, n, 0), 0.0, 1.0, 0.25, 20.0); - } }