diff options
author | John Glover <glover.john@gmail.com> | 2010-10-21 13:39:28 +0100 |
---|---|---|
committer | John Glover <glover.john@gmail.com> | 2010-10-21 13:39:28 +0100 |
commit | ce65c30264be9683dd3a59b35730d2f31e02d37f (patch) | |
tree | 90aaf2e77526af9ba099e76175956d0dd6a37633 /sndobj/SndIO.h | |
parent | b46b988f164f983fc889c7bc0c96953e4609d27a (diff) | |
download | simpl-ce65c30264be9683dd3a59b35730d2f31e02d37f.tar.gz simpl-ce65c30264be9683dd3a59b35730d2f31e02d37f.tar.bz2 simpl-ce65c30264be9683dd3a59b35730d2f31e02d37f.zip |
Changed from floats to doubles in the C/C++ code, makes Python integration a bit easier. Fixed a bug that would cause SndObjSynthesis to crash if peak values were floats.
Diffstat (limited to 'sndobj/SndIO.h')
-rw-r--r-- | sndobj/SndIO.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sndobj/SndIO.h b/sndobj/SndIO.h index 2516880..ad9456e 100644 --- a/sndobj/SndIO.h +++ b/sndobj/SndIO.h @@ -82,8 +82,8 @@ class SndIO { protected: SndObj** m_IOobjs; - float* m_output; - float m_sr; + double* m_output; + double m_sr; short m_channels; short m_bits; int m_vecsize; @@ -100,7 +100,7 @@ class SndIO { public: short m_sampsize; - float GetSr(){ return m_sr; } + double GetSr(){ return m_sr; } int GetVectorSize() { return m_vecsize; } void SetVectorSize(int vecsize); void LimitVectorSize(int limit) { @@ -112,8 +112,8 @@ class SndIO { void RestoreVectorSize(){ m_vecsize = m_vecsize_max; } short GetChannels() { return m_channels; } short GetSize() { return m_bits; } - float Output(int pos){ return m_output[pos]; } - float Output(int pos, int channel){ + double Output(int pos){ return m_output[pos]; } + double Output(int pos, int channel){ return m_output[(pos*m_channels)+(channel-1)]; } short SetOutput(short channel, SndObj* input){ @@ -124,7 +124,7 @@ class SndIO { } SndIO(short channels=1, short bits=16,SndObj** inputlist=0, - int vecsize = DEF_VECSIZE, float sr = DEF_SR); + int vecsize = DEF_VECSIZE, double sr = DEF_SR); virtual ~SndIO(); virtual short Read(); virtual short Write(); |