Mercurial > hg > svcore
diff data/fileio/CodedAudioFileReader.h @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | 36f79bc5c3d7 |
children | a1cd5abcb38b |
line wrap: on
line diff
--- a/data/fileio/CodedAudioFileReader.h Tue Mar 03 09:33:59 2015 +0000 +++ b/data/fileio/CodedAudioFileReader.h Tue Mar 03 15:18:24 2015 +0000 @@ -38,7 +38,7 @@ CacheInMemory }; - virtual void getInterleavedFrames(int start, int count, + virtual void getInterleavedFrames(sv_frame_t start, sv_frame_t count, SampleBlock &frames) const; virtual int getNativeRate() const { return m_fileRate; } @@ -59,8 +59,8 @@ void initialiseDecodeCache(); // samplerate, channels must have been set // may throw InsufficientDiscSpace: - void addSamplesToDecodeCache(float **samples, int nframes); - void addSamplesToDecodeCache(float *samplesInterleaved, int nframes); + void addSamplesToDecodeCache(float **samples, sv_frame_t nframes); + void addSamplesToDecodeCache(float *samplesInterleaved, sv_frame_t nframes); void addSamplesToDecodeCache(const SampleBlock &interleaved); // may throw InsufficientDiscSpace: @@ -72,9 +72,9 @@ void endSerialised(); private: - void pushBuffer(float *interleaved, int sz, bool final); - void pushBufferResampling(float *interleaved, int sz, float ratio, bool final); - void pushBufferNonResampling(float *interleaved, int sz); + void pushBuffer(float *interleaved, sv_frame_t sz, bool final); + void pushBufferResampling(float *interleaved, sv_frame_t sz, double ratio, bool final); + void pushBufferNonResampling(float *interleaved, sv_frame_t sz); protected: QMutex m_cacheMutex; @@ -89,12 +89,12 @@ SNDFILE *m_cacheFileWritePtr; WavFileReader *m_cacheFileReader; float *m_cacheWriteBuffer; - int m_cacheWriteBufferIndex; - int m_cacheWriteBufferSize; // frames + sv_frame_t m_cacheWriteBufferIndex; + sv_frame_t m_cacheWriteBufferSize; // frames Resampler *m_resampler; float *m_resampleBuffer; - int m_fileFrameCount; + sv_frame_t m_fileFrameCount; bool m_normalised; float m_max;