diff data/fileio/CSVFileReader.cpp @ 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 fbe8afdfa8a6
children 70e172e6cc59
line wrap: on
line diff
--- a/data/fileio/CSVFileReader.cpp	Tue Sep 11 14:36:51 2018 +0100
+++ b/data/fileio/CSVFileReader.cpp	Wed Sep 12 13:56:56 2018 +0100
@@ -348,7 +348,10 @@
                                       == CSVFormat::SampleRangeOther);
                     QString path = getConvertedAudioFilePath();
                     modelW = new WritableWaveFileModel
-                        (sampleRate, valueColumns, path, normalise);
+                        (path, sampleRate, valueColumns,
+                         normalise ?
+                         WritableWaveFileModel::Normalisation::Peak :
+                         WritableWaveFileModel::Normalisation::None);
                     modelName = QFileInfo(path).fileName();
                     model = modelW;
                     break;