From 8ec3e7fee6785b2cc35dfe37ffd95b71a1033872 Mon Sep 17 00:00:00 2001 From: Mick Grierson Date: Mon, 5 Dec 2011 22:44:18 +0000 Subject: moving stuff in from my branch --- ofxMaxim/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp | 8 ++++---- ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp | 8 ++++---- ofxMaxim/ofxMaxim/libs/maximilian.cpp | 8 ++++---- ofxMaxim/ofxMaxim/libs/maximilian.h | 2 +- ofxMaxim/ofxMaximiPhone0062Example/ofxMaxim/libs/maximilian.cpp | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'ofxMaxim') diff --git a/ofxMaxim/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp b/ofxMaxim/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp index bc1c67f..0f37cf1 100644 --- a/ofxMaxim/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp +++ b/ofxMaxim/ofMaximExample007OSX/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 (position0.) { if (positionlength) position=0; @@ -526,7 +526,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)/(samplerate/mySampleRate)); if (speed >=0) { @@ -573,7 +573,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 (position0.) { if (positionlength) 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 (position0.) { if (positionlength) 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 (position0.) { if (position