comparison examples/basic_FFT_phase_vocoder/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 db2fe4e1b88e
comparison
equal deleted inserted replaced
307:ff5f346a293e 308:1feb9c23ac57
214 214
215 // Prep the "input" to be the sound file played in a loop 215 // Prep the "input" to be the sound file played in a loop
216 for(int n = 0; n < numAudioFrames; n++) { 216 for(int n = 0; n < numAudioFrames; n++) {
217 if(gReadPtr < gSampleData.sampleLen) 217 if(gReadPtr < gSampleData.sampleLen)
218 audioIn[2*n] = audioIn[2*n+1] = gSampleData.samples[gReadPtr]*(1-gPlaybackLive) + 218 audioIn[2*n] = audioIn[2*n+1] = gSampleData.samples[gReadPtr]*(1-gPlaybackLive) +
219 gPlaybackLive*0.5f*(audioReadFrame(context,n,0)+audioReadFrame(context,n,1)); 219 gPlaybackLive*0.5f*(audioRead(context,n,0)+audioRead(context,n,1));
220 else 220 else
221 audioIn[2*n] = audioIn[2*n+1] = 0; 221 audioIn[2*n] = audioIn[2*n+1] = 0;
222 if(++gReadPtr >= gSampleData.sampleLen) 222 if(++gReadPtr >= gSampleData.sampleLen)
223 gReadPtr = 0; 223 gReadPtr = 0;
224 } 224 }