Mercurial > hg > beaglert
diff projects/scope/render.cpp @ 144:55c1e591cb2e ClockSync
Added ifdefs for USE_JUCE compatibility
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 14 Sep 2015 21:31:09 +0100 |
parents | 44d07fa9bd03 |
children | 134bff10e561 |
line wrap: on
line diff
--- a/projects/scope/render.cpp Mon Sep 14 17:35:18 2015 +0100 +++ b/projects/scope/render.cpp Mon Sep 14 21:31:09 2015 +0100 @@ -77,15 +77,14 @@ clockSyncThread.startThread(); //make sure you uncomment .init in setup() } static float phase=0; - float phaseInc=200.0/44100.0*2*M_PI; + float phaseInc=gFrequency1/44100.0*2*M_PI; // rt_printf("phaseInc: %f, phase: %f\n",phaseInc,phase); for(unsigned int n=0; n<context->audioFrames; n++){ - context->audioOut[n*2]=sinf(phaseInc);//context->audioIn[n*2]; - context->audioOut[n*2+1]=sinf(phaseInc);//context->audioIn[n*2]; + context->audioOut[n*2]=sinf(phase);//context->audioIn[n*2]; phase+=200.0/44100.0*2*M_PI; if(phase>=2*M_PI) phase-=2*M_PI; -// context->audioOut[n*2+1]=rand()/(float)RAND_MAX;context->audioIn[n*2]; + context->audioOut[n*2+1]=rand()/(float)RAND_MAX;context->audioIn[n*2]; } count++; /*