diff data/model/WritableWaveFileModel.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 59e7fe1b1003
children a1cd5abcb38b
line wrap: on
line diff
--- a/data/model/WritableWaveFileModel.h	Tue Mar 03 09:33:59 2015 +0000
+++ b/data/model/WritableWaveFileModel.h	Tue Mar 03 15:18:24 2015 +0000
@@ -35,7 +35,7 @@
      * progress of this file, if it has a known end point, and should
      * call setCompletion(100) when the file has been written.
      */
-    virtual bool addSamples(float **samples, int count);
+    virtual bool addSamples(float **samples, sv_frame_t count);
     
     bool isOK() const;
     bool isReady(int *) const;
@@ -48,7 +48,7 @@
         return &zc;
     }
 
-    int getFrameCount() const;
+    sv_frame_t getFrameCount() const;
     int getChannelCount() const { return m_channels; }
     int getSampleRate() const { return m_sampleRate; }
 
@@ -57,27 +57,27 @@
     float getValueMinimum() const { return -1.0f; }
     float getValueMaximum() const { return  1.0f; }
 
-    virtual int getStartFrame() const { return m_startFrame; }
-    virtual int getEndFrame() const { return m_startFrame + getFrameCount(); }
+    virtual sv_frame_t getStartFrame() const { return m_startFrame; }
+    virtual sv_frame_t getEndFrame() const { return m_startFrame + getFrameCount(); }
 
-    void setStartFrame(int startFrame);
+    void setStartFrame(sv_frame_t startFrame);
 
-    virtual int getData(int channel, int start, int count,
+    virtual sv_frame_t getData(int channel, sv_frame_t start, sv_frame_t count,
                            float *buffer) const;
 
-    virtual int getData(int channel, int start, int count,
+    virtual sv_frame_t getData(int channel, sv_frame_t start, sv_frame_t count,
                            double *buffer) const;
 
-    virtual int getData(int fromchannel, int tochannel,
-                           int start, int count,
+    virtual sv_frame_t getData(int fromchannel, int tochannel,
+                           sv_frame_t start, sv_frame_t count,
                            float **buffer) const;
 
     virtual int getSummaryBlockSize(int desired) const;
 
-    virtual void getSummaries(int channel, int start, int count,
+    virtual void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
                               RangeBlock &ranges, int &blockSize) const;
 
-    virtual Range getSummary(int channel, int start, int count) const;
+    virtual Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const;
 
     QString getTypeName() const { return tr("Writable Wave File"); }
 
@@ -91,8 +91,8 @@
     WavFileReader *m_reader;
     int m_sampleRate;
     int m_channels;
-    int m_frameCount;
-    int m_startFrame;
+    sv_frame_t m_frameCount;
+    sv_frame_t m_startFrame;
     int m_completion;
 };