diff data/model/WritableWaveFileModel.cpp @ 1069:32ab6c48efaa

Merge from branch tonioni
author Chris Cannam
date Mon, 20 Apr 2015 09:11:34 +0100
parents 0fd3661bcfff
children 9f4505ac9072
line wrap: on
line diff
--- a/data/model/WritableWaveFileModel.cpp	Mon Mar 02 17:21:34 2015 +0000
+++ b/data/model/WritableWaveFileModel.cpp	Mon Apr 20 09:11:34 2015 +0100
@@ -30,7 +30,7 @@
 
 //#define DEBUG_WRITABLE_WAVE_FILE_MODEL 1
 
-WritableWaveFileModel::WritableWaveFileModel(int sampleRate,
+WritableWaveFileModel::WritableWaveFileModel(sv_samplerate_t sampleRate,
 					     int channels,
 					     QString path) :
     m_model(0),
@@ -86,8 +86,8 @@
     m_model->setStartFrame(m_startFrame);
 
     connect(m_model, SIGNAL(modelChanged()), this, SIGNAL(modelChanged()));
-    connect(m_model, SIGNAL(modelChangedWithin(int, int)),
-            this, SIGNAL(modelChangedWithin(int, int)));
+    connect(m_model, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)),
+            this, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)));
 }
 
 WritableWaveFileModel::~WritableWaveFileModel()
@@ -98,14 +98,14 @@
 }
 
 void
-WritableWaveFileModel::setStartFrame(int startFrame)
+WritableWaveFileModel::setStartFrame(sv_frame_t startFrame)
 {
     m_startFrame = startFrame;
     if (m_model) m_model->setStartFrame(startFrame);
 }
 
 bool
-WritableWaveFileModel::addSamples(float **samples, int count)
+WritableWaveFileModel::addSamples(float **samples, sv_frame_t count)
 {
     if (!m_writer) return false;
 
@@ -162,39 +162,32 @@
     }
 }
 
-int
+sv_frame_t
 WritableWaveFileModel::getFrameCount() const
 {
 //    SVDEBUG << "WritableWaveFileModel::getFrameCount: count = " << m_frameCount << endl;
     return m_frameCount;
 }
 
-Model *
-WritableWaveFileModel::clone() const
-{
-    assert(0); //!!!
-    return 0;
-}
-
-int
-WritableWaveFileModel::getData(int channel, int start, int count,
+sv_frame_t
+WritableWaveFileModel::getData(int channel, sv_frame_t start, sv_frame_t count,
                                float *buffer) const
 {
     if (!m_model || m_model->getChannelCount() == 0) return 0;
     return m_model->getData(channel, start, count, buffer);
 }
 
-int
-WritableWaveFileModel::getData(int channel, int start, int count,
+sv_frame_t
+WritableWaveFileModel::getData(int channel, sv_frame_t start, sv_frame_t count,
                                double *buffer) const
 {
     if (!m_model || m_model->getChannelCount() == 0) return 0;
     return m_model->getData(channel, start, count, buffer);
 }
 
-int
+sv_frame_t
 WritableWaveFileModel::getData(int fromchannel, int tochannel,
-                               int start, int count,
+                               sv_frame_t start, sv_frame_t count,
                                float **buffers) const
 {
     if (!m_model || m_model->getChannelCount() == 0) return 0;
@@ -209,7 +202,7 @@
 }
 
 void
-WritableWaveFileModel::getSummaries(int channel, int start, int count,
+WritableWaveFileModel::getSummaries(int channel, sv_frame_t start, sv_frame_t count,
                                     RangeBlock &ranges,
                                     int &blockSize) const
 {
@@ -219,7 +212,7 @@
 }
 
 WritableWaveFileModel::Range
-WritableWaveFileModel::getSummary(int channel, int start, int count) const
+WritableWaveFileModel::getSummary(int channel, sv_frame_t start, sv_frame_t count) const
 {
     if (!m_model || m_model->getChannelCount() == 0) return Range();
     return m_model->getSummary(channel, start, count);