From 8683b03800a2ea9523b8c4b250ed780fd4cf9e6b Mon Sep 17 00:00:00 2001 From: Mick Grierson Date: Mon, 31 Oct 2011 16:40:35 +0000 Subject: updated oxfMaxim to the latest version of maximilian ofxMaxim now has one shot sample playback with speed, sample loading takes a channel arg (0 for left, 1 for right, default 0). Triangle wave fixed, new easy to use envelopes with adsr function, gate and compressor, minor changes here and there to a few methods. --- maximilian.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'maximilian.h') diff --git a/maximilian.h b/maximilian.h index 5062ba5..4ec75d1 100755 --- a/maximilian.h +++ b/maximilian.h @@ -137,6 +137,7 @@ class maxiFilter { double z;//pole double c;//filter coefficient public: + maxiFilter():x(0.0), y(0.0), z(0.0), c(0.0){}; double cutoff; double resonance; double lores(double input,double cutoff1, double resonance); @@ -173,12 +174,12 @@ private: int myByteRate; short myBlockAlign; short myBitsPerSample; - int myDataSize; double position; double speed; double output; public: + int myDataSize; short myChannels; int mySampleRate; long length; @@ -191,7 +192,7 @@ public: ~maxiSample() { - delete myData; + if (myData) delete[] myData; myChunkSize = NULL; mySubChunk1Size = NULL; myFormat = NULL; @@ -203,7 +204,7 @@ public: myDataSize = NULL; } -// maxiSample(); + maxiSample():myData(NULL){}; bool load(string fileName, int channel=0); -- cgit v1.3