comparison 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
comparison
equal deleted inserted replaced
1519:fbe8afdfa8a6 1520:954d0cf29ca7
346 { 346 {
347 bool normalise = (m_format.getAudioSampleRange() 347 bool normalise = (m_format.getAudioSampleRange()
348 == CSVFormat::SampleRangeOther); 348 == CSVFormat::SampleRangeOther);
349 QString path = getConvertedAudioFilePath(); 349 QString path = getConvertedAudioFilePath();
350 modelW = new WritableWaveFileModel 350 modelW = new WritableWaveFileModel
351 (sampleRate, valueColumns, path, normalise); 351 (path, sampleRate, valueColumns,
352 normalise ?
353 WritableWaveFileModel::Normalisation::Peak :
354 WritableWaveFileModel::Normalisation::None);
352 modelName = QFileInfo(path).fileName(); 355 modelName = QFileInfo(path).fileName();
353 model = modelW; 356 model = modelW;
354 break; 357 break;
355 } 358 }
356 } 359 }