changeset 1325:3aea4f7617bb 3.0-integration

Handle increases in the overall channel count by closing and reopening the audio device.
author Chris Cannam
date Tue, 13 Dec 2016 12:03:48 +0000
parents 4dbb7a7c9c28
children 54af1e21705c
files data/fileio/WavFileWriter.cpp data/fileio/WavFileWriter.h data/model/WritableWaveFileModel.cpp data/model/WritableWaveFileModel.h
diffstat 4 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/WavFileWriter.cpp	Fri Dec 09 19:04:33 2016 +0000
+++ b/data/fileio/WavFileWriter.cpp	Tue Dec 13 12:03:48 2016 +0000
@@ -166,7 +166,7 @@
 }
 	
 bool
-WavFileWriter::writeSamples(float **samples, sv_frame_t count)
+WavFileWriter::writeSamples(const float *const *samples, sv_frame_t count)
 {
     if (!m_file) {
         m_error = QString("Failed to write model to audio file '%1': File not open")
--- a/data/fileio/WavFileWriter.h	Fri Dec 09 19:04:33 2016 +0000
+++ b/data/fileio/WavFileWriter.h	Tue Dec 13 12:03:48 2016 +0000
@@ -59,7 +59,7 @@
     bool writeModel(DenseTimeValueModel *source,
                     MultiSelection *selection = 0);
 
-    bool writeSamples(float **samples, sv_frame_t count); // count per channel
+    bool writeSamples(const float *const *samples, sv_frame_t count); // count per channel
 
     bool close();
 
--- a/data/model/WritableWaveFileModel.cpp	Fri Dec 09 19:04:33 2016 +0000
+++ b/data/model/WritableWaveFileModel.cpp	Tue Dec 13 12:03:48 2016 +0000
@@ -111,7 +111,7 @@
 }
 
 bool
-WritableWaveFileModel::addSamples(float **samples, sv_frame_t count)
+WritableWaveFileModel::addSamples(const float *const *samples, sv_frame_t count)
 {
     if (!m_writer) return false;
 
--- a/data/model/WritableWaveFileModel.h	Fri Dec 09 19:04:33 2016 +0000
+++ b/data/model/WritableWaveFileModel.h	Tue Dec 13 12:03:48 2016 +0000
@@ -37,7 +37,7 @@
      * the progress of this file, if it has a known end point, and
      * should call writeComplete() when the file has been written.
      */
-    virtual bool addSamples(float **samples, sv_frame_t count);
+    virtual bool addSamples(const float *const *samples, sv_frame_t count);
 
     /**
      * Set the proportion of the file which has been written so far,