Mercurial > hg > beaglert
changeset 538:58652b93ef7e prerelease
Converted some spaces to tabs
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 24 Jun 2016 01:40:25 +0100 |
parents | b97fe1dc4278 |
children | b486344aa796 |
files | examples/04-Audio/tremolo/render.cpp |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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); - } }