Mercurial > hg > beaglert
diff examples/bucket_brigade_chorus/render.cpp @ 308:1feb9c23ac57 prerelease
Renamed read/write functions to remove the Frame --> e.g. analogWriteFrameOnce -> analogWriteOnce, digitalReadFrame -> digitalRead
author | andrewm |
---|---|
date | Fri, 27 May 2016 18:21:21 +0100 |
parents | e4392164b458 |
children | 9dc5a0ccad25 |
line wrap: on
line diff
--- a/examples/bucket_brigade_chorus/render.cpp Fri May 27 18:12:15 2016 +0100 +++ b/examples/bucket_brigade_chorus/render.cpp Fri May 27 18:21:21 2016 +0100 @@ -93,11 +93,11 @@ for(unsigned int n = 0; n < context->audioFrames; n++) { feedback = 0.4; - float input = audioReadFrame(context, n, 0) + audioReadFrame(context, n, 1); + float input = audioRead(context, n, 0) + audioRead(context, n, 1); delay[writePointer++] = input + delay[readPointer]*feedback; float output = (input + 0.9*delay[readPointer++] ) * 0.5; - audioWriteFrame(context, n, 0, output); - audioWriteFrame(context, n, 1, output); + audioWrite(context, n, 0, output); + audioWrite(context, n, 1, output); if(writePointer>=delayLength) writePointer-=delayLength; if(readPointer>=delayLength)