aboutsummaryrefslogtreecommitdiffstats
path: root/ofxMaxim
diff options
context:
space:
mode:
authorChris Kiefer <chrisk13fer@gmail.com>2011-12-09 10:53:19 +0000
committerChris Kiefer <chrisk13fer@gmail.com>2011-12-09 10:53:19 +0000
commitc8963a4de178b46b6e230ea99dba1bb1ee850331 (patch)
tree43db4ea34ccf879c97cd4bc69b3256f55d186f31 /ofxMaxim
parentf0436cdcb2fac9ec28dc4feb3aad7d8898103d2c (diff)
parent8ec3e7fee6785b2cc35dfe37ffd95b71a1033872 (diff)
Merge branch 'master' of github.com:micknoise/Maximilian
Diffstat (limited to 'ofxMaxim')
-rw-r--r--ofxMaxim/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp8
-rwxr-xr-xofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp8
-rw-r--r--ofxMaxim/ofxMaxim/libs/maximilian.cpp8
-rwxr-xr-xofxMaxim/ofxMaxim/libs/maximilian.h2
-rw-r--r--ofxMaxim/ofxMaximiPhone0062Example/ofxMaxim/libs/maximilian.cpp8
5 files changed, 17 insertions, 17 deletions
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 (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;
diff --git a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp
index a0ee618..adb0068 100755
--- a/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp
+++ b/ofxMaxim/ofMaximWindowsVS2008_emptyExample/src/maximilian.cpp
@@ -515,7 +515,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;
@@ -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 (position<start) {
position=start;
@@ -629,7 +629,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;
diff --git a/ofxMaxim/ofxMaxim/libs/maximilian.cpp b/ofxMaxim/ofxMaxim/libs/maximilian.cpp
index bc1c67f..0f37cf1 100644
--- a/ofxMaxim/ofxMaxim/libs/maximilian.cpp
+++ b/ofxMaxim/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;
diff --git a/ofxMaxim/ofxMaxim/libs/maximilian.h b/ofxMaxim/ofxMaxim/libs/maximilian.h
index db1440e..fdee6ea 100755
--- a/ofxMaxim/ofxMaxim/libs/maximilian.h
+++ b/ofxMaxim/ofxMaxim/libs/maximilian.h
@@ -101,7 +101,7 @@ class maxiEnvelope {
double currentval;
double nextval;
int isPlaying;
-
+
public:
double line(int numberofsegments,double segments[100]);
void trigger(int index,double amp);
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;