diff data/fileio/AudioFileReader.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/AudioFileReader.h	Tue Mar 03 09:33:59 2015 +0000
+++ b/data/fileio/AudioFileReader.h	Tue Mar 03 15:18:24 2015 +0000
@@ -18,6 +18,7 @@
 
 #include <QString>
 
+#include "base/BaseTypes.h"
 #include "FileSource.h"
 
 #include <vector>
@@ -36,7 +37,7 @@
 
     virtual QString getError() const { return ""; }
 
-    int getFrameCount() const { return m_frameCount; }
+    sv_frame_t getFrameCount() const { return m_frameCount; }
     int getChannelCount() const { return m_channelCount; }
     int getSampleRate() const { return m_sampleRate; }
 
@@ -93,7 +94,7 @@
      * thread-safe -- that is, safe to call from multiple threads with
      * different arguments on the same object at the same time.
      */
-    virtual void getInterleavedFrames(int start, int count,
+    virtual void getInterleavedFrames(sv_frame_t start, sv_frame_t count,
 				      SampleBlock &frames) const = 0;
 
     /**
@@ -103,7 +104,7 @@
      * will contain getChannelCount() sample blocks of count samples
      * each (or fewer if end of file is reached).
      */
-    virtual void getDeInterleavedFrames(int start, int count,
+    virtual void getDeInterleavedFrames(sv_frame_t start, sv_frame_t count,
                                         std::vector<SampleBlock> &frames) const;
 
     // only subclasses that do not know exactly how long the audio
@@ -116,7 +117,7 @@
     void frameCountChanged();
     
 protected:
-    int m_frameCount;
+    sv_frame_t m_frameCount;
     int m_channelCount;
     int m_sampleRate;
 };