diff data/fileio/WavFileWriter.h @ 1520:954d0cf29ca7 import-audio-data

Switch the normalisation option in WritableWaveFileModel from normalising on read to normalising on write, so that the saved file is already normalised and therefore can be read again without having to remember to normalise it
author Chris Cannam
date Wed, 12 Sep 2018 13:56:56 +0100
parents 1bc6f70cb4c7
children
line wrap: on
line diff
--- a/data/fileio/WavFileWriter.h	Tue Sep 11 14:36:51 2018 +0100
+++ b/data/fileio/WavFileWriter.h	Wed Sep 12 13:56:56 2018 +0100
@@ -64,7 +64,11 @@
     bool writeModel(DenseTimeValueModel *source,
                     MultiSelection *selection = 0);
 
-    bool writeSamples(const float *const *samples, sv_frame_t count); // count per channel
+    /// Write samples from raw arrays; count is per-channel
+    bool writeSamples(const float *const *samples, sv_frame_t count);
+
+    /// As writeSamples, but compatible with WavFileReader api. More expensive.
+    bool putInterleavedFrames(const floatvec_t &frames);
 
     bool close();