diff data/fileio/CodedAudioFileReader.h @ 929:59e7fe1b1003 warnfix_no_size_t

Unsigned removals and warning fixes in data/
author Chris Cannam
date Tue, 17 Jun 2014 14:33:42 +0100
parents f0558e69a074
children d03b3d956358
line wrap: on
line diff
--- a/data/fileio/CodedAudioFileReader.h	Tue Jun 17 13:52:07 2014 +0100
+++ b/data/fileio/CodedAudioFileReader.h	Tue Jun 17 14:33:42 2014 +0100
@@ -38,10 +38,10 @@
         CacheInMemory
     };
 
-    virtual void getInterleavedFrames(size_t start, size_t count,
+    virtual void getInterleavedFrames(int start, int count,
 				      SampleBlock &frames) const;
 
-    virtual size_t getNativeRate() const { return m_fileRate; }
+    virtual int getNativeRate() const { return m_fileRate; }
 
     /// Intermediate cache means all CodedAudioFileReaders are quickly seekable
     virtual bool isQuicklySeekable() const { return true; }
@@ -50,13 +50,13 @@
     void progress(int);
 
 protected:
-    CodedAudioFileReader(CacheMode cacheMode, size_t targetRate);
+    CodedAudioFileReader(CacheMode cacheMode, int targetRate);
 
     void initialiseDecodeCache(); // samplerate, channels must have been set
 
     // may throw InsufficientDiscSpace:
-    void addSamplesToDecodeCache(float **samples, size_t nframes);
-    void addSamplesToDecodeCache(float *samplesInterleaved, size_t nframes);
+    void addSamplesToDecodeCache(float **samples, int nframes);
+    void addSamplesToDecodeCache(float *samplesInterleaved, int nframes);
     void addSamplesToDecodeCache(const SampleBlock &interleaved);
 
     // may throw InsufficientDiscSpace:
@@ -68,9 +68,9 @@
     void endSerialised();
 
 private:
-    void pushBuffer(float *interleaved, size_t sz, bool final);
-    void pushBufferResampling(float *interleaved, size_t sz, float ratio, bool final);
-    void pushBufferNonResampling(float *interleaved, size_t sz);
+    void pushBuffer(float *interleaved, int sz, bool final);
+    void pushBufferResampling(float *interleaved, int sz, float ratio, bool final);
+    void pushBufferNonResampling(float *interleaved, int sz);
 
 protected:
     QMutex m_cacheMutex;
@@ -79,18 +79,18 @@
     mutable QReadWriteLock m_dataLock;
     bool m_initialised;
     Serialiser *m_serialiser;
-    size_t m_fileRate;
+    int m_fileRate;
 
     QString m_cacheFileName;
     SNDFILE *m_cacheFileWritePtr;
     WavFileReader *m_cacheFileReader;
     float *m_cacheWriteBuffer;
-    size_t m_cacheWriteBufferIndex;
-    size_t m_cacheWriteBufferSize; // frames
+    int m_cacheWriteBufferIndex;
+    int m_cacheWriteBufferSize; // frames
 
     Resampler *m_resampler;
     float *m_resampleBuffer;
-    size_t m_fileFrameCount;
+    int m_fileFrameCount;
 };
 
 #endif