diff options
| author | Mick Grierson <mickgrierson@gmail.com> | 2011-12-05 22:44:18 +0000 |
|---|---|---|
| committer | Mick Grierson <mickgrierson@gmail.com> | 2011-12-05 22:44:18 +0000 |
| commit | 8ec3e7fee6785b2cc35dfe37ffd95b71a1033872 (patch) | |
| tree | da75380fad100ae4b168cbf473c4c03a7a11a6ca /ofxMaxim/ofxMaximiPhone0062Example | |
| parent | 1aed9a7169c0c21e68b0e1308177cbe5952548d3 (diff) | |
moving stuff in from my branch
Diffstat (limited to 'ofxMaxim/ofxMaximiPhone0062Example')
| -rw-r--r-- | ofxMaxim/ofxMaximiPhone0062Example/ofxMaxim/libs/maximilian.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ofxMaxim/ofxMaximiPhone0062Example/ofxMaxim/libs/maximilian.cpp b/ofxMaxim/ofxMaximiPhone0062Example/ofxMaxim/libs/maximilian.cpp index bc1c67f..0f37cf1 100644 --- a/ofxMaxim/ofxMaximiPhone0062Example/ofxMaxim/libs/maximilian.cpp +++ b/ofxMaxim/ofxMaximiPhone0062Example/ofxMaxim/libs/maximilian.cpp @@ -658,7 +658,7 @@ double maxiSample::play4(double frequency, double start, double end) { double maxiSample::bufferPlay(unsigned char &bufferin,long length) { double remainder; - short* buffer = (short *)bufferin; + short* buffer = (short *)&bufferin; position=(position+1); remainder = position - (long) position; if ((long) position>length) position=0; @@ -669,7 +669,7 @@ double maxiSample::bufferPlay(unsigned char &bufferin,long length) { double maxiSample::bufferPlay(unsigned char &bufferin,double speed,long length) { double remainder; long a,b; - short* buffer = (short *)bufferin; + short* buffer = (short *)&bufferin; position=position+((speed*chandiv*myChannels)/(maxiSettings::sampleRate/mySampleRate)); if (speed >=0) { @@ -716,7 +716,7 @@ double maxiSample::bufferPlay(unsigned char &bufferin,double frequency, double s double remainder; length=end; long a,b; - short* buffer = (short *)bufferin; + short* buffer = (short *)&bufferin; if (frequency >0.) { if (position<start) { position=start; @@ -772,7 +772,7 @@ double maxiSample::bufferPlay(unsigned char &bufferin,double frequency, double s double maxiSample::bufferPlay4(unsigned char &bufferin,double frequency, double start, double end) { double remainder; double a,b,c,d,a1,a2,a3; - short* buffer = (short*)bufferin; + short* buffer = (short*)&bufferin; if (frequency >0.) { if (position<start) { position=start; |
