Mercurial > hg > beaglert
diff examples/basic_midi/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/basic_midi/render.cpp Fri May 27 18:12:15 2016 +0100 +++ b/examples/basic_midi/render.cpp Fri May 27 18:21:21 2016 +0100 @@ -133,7 +133,7 @@ for(unsigned int n = 0; n < context->analogFrames; n++){ static int count = 0; static bool state = 0; - analogWriteFrameOnce(context, n, 1, state); + analogWriteOnce(context, n, 1, state); if(count % 40000 == 0){ state = !state; midi_byte_t bytes[6] = {176, 30, (char)(state*127), 176, 67, 30}; // toggle the OWL led and ask for the led status @@ -148,11 +148,11 @@ if(phase > 2 * M_PI) phase -= 2 * M_PI; float value = sinf(phase) * gVelocity/128.0f; - audioWriteFrame(context, n, 0, value); - audioWriteFrame(context, n, 1, value); + audioWrite(context, n, 0, value); + audioWrite(context, n, 1, value); } else { - audioWriteFrame(context, n, 0, 0); - audioWriteFrame(context, n, 1, 0); + audioWrite(context, n, 0, 0); + audioWrite(context, n, 1, 0); } } }