diff options
Diffstat (limited to 'khotkeys/shared')
-rw-r--r-- | khotkeys/shared/sound.cpp | 6 | ||||
-rw-r--r-- | khotkeys/shared/sound.h | 2 | ||||
-rw-r--r-- | khotkeys/shared/voicesignature.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/khotkeys/shared/sound.cpp b/khotkeys/shared/sound.cpp index cb2ef54d1..5b99a1cba 100644 --- a/khotkeys/shared/sound.cpp +++ b/khotkeys/shared/sound.cpp @@ -93,7 +93,7 @@ void Sound::load(const TQString& filename) TQ_INT32 nb=0; for(uint k=0;k<BytePS;k++) { - nb |= (SoundData.at(f*BytePS+k)&0x000000FF) << (k*8); + nb |= (SoundData.tqat(f*BytePS+k)&0x000000FF) << (k*8); } if(nb & (1 << (BytePS*8 -1)) ) nb = nb-(1<<BytePS*8); @@ -129,11 +129,11 @@ void Sound::save(const TQString& filename) const for(unsigned long int f=0;f<data.size();f++) { - TQ_UINT16 val= (signed short int) ( (data.at(f) * ((double)(1<<13)/(signed)max) ) ); + TQ_UINT16 val= (signed short int) ( (data.tqat(f) * ((double)(1<<13)/(signed)max) ) ); SoundData.tqat( 2*f )= val & 0x00FF; SoundData.tqat(2*f+1)= (val & 0xFF00) >> 8; -// kdDebug( 1217 ) << k_funcinfo << data.at(f) << " / " << max << " = " << val << " | " << SoundData[ 2*f ] << " "<< SoundData[ 2*f+1 ] << endl; +// kdDebug( 1217 ) << k_funcinfo << data.tqat(f) << " / " << max << " = " << val << " | " << SoundData[ 2*f ] << " "<< SoundData[ 2*f+1 ] << endl; } TQ_UINT16 NumberOfChannels=2; diff --git a/khotkeys/shared/sound.h b/khotkeys/shared/sound.h index 6453563de..9dca03a99 100644 --- a/khotkeys/shared/sound.h +++ b/khotkeys/shared/sound.h @@ -42,7 +42,7 @@ public: inline float at(int pos) const { - return (float)(data.at(pos))/max; + return (float)(data.tqat(pos))/max; } inline uint fs() const diff --git a/khotkeys/shared/voicesignature.cpp b/khotkeys/shared/voicesignature.cpp index 773f28731..b40c8fd6a 100644 --- a/khotkeys/shared/voicesignature.cpp +++ b/khotkeys/shared/voicesignature.cpp @@ -210,7 +210,7 @@ TQMemArray<double> VoiceSignature::fft(const Sound& sound, unsigned int start, u for(uint x=start; x<stop; x++) { - Complex s(sound.at(x)); + Complex s(sound.tqat(x)); double angle=-2*PI*f*x/8000; s*= Complex( cos(angle) , sin(angle) ); c+=s; @@ -228,7 +228,7 @@ bool VoiceSignature::window(const Sound& sound, unsigned int *_start, unsigned i if(length < unit ) return false; - //Fen�trage + //Fen�trage unsigned int start=0 , stop=0; double moy=0; for(uint x=0;x<unit;x++) |