# HG changeset patch # User Chris Cannam # Date 1481630628 0 # Node ID 3aea4f7617bb83299bd647f9e6f193d6639600ec # Parent 4dbb7a7c9c2898c31dac32d5e54cbb92daaf1665 Handle increases in the overall channel count by closing and reopening the audio device. diff -r 4dbb7a7c9c28 -r 3aea4f7617bb data/fileio/WavFileWriter.cpp --- 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") diff -r 4dbb7a7c9c28 -r 3aea4f7617bb data/fileio/WavFileWriter.h --- 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(); diff -r 4dbb7a7c9c28 -r 3aea4f7617bb data/model/WritableWaveFileModel.cpp --- 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; diff -r 4dbb7a7c9c28 -r 3aea4f7617bb data/model/WritableWaveFileModel.h --- 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,