Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 1986:bb9cf19e0b67 import-audio-data
Treat every numeric column as a value when importing raw audio data
author | Chris Cannam |
---|---|
date | Wed, 05 Sep 2018 11:57:10 +0100 |
parents | 015416e3a298 |
children | fbf8ce45fcad |
comparison
equal
deleted
inserted
replaced
1985:c37e67a2ff17 | 1986:bb9cf19e0b67 |
---|---|
2895 CSVFormat format(path); | 2895 CSVFormat format(path); |
2896 format.setModelType(CSVFormat::WaveFileModel); | 2896 format.setModelType(CSVFormat::WaveFileModel); |
2897 format.setSampleRate(rate); | 2897 format.setSampleRate(rate); |
2898 format.setTimingType(CSVFormat::ImplicitTiming); | 2898 format.setTimingType(CSVFormat::ImplicitTiming); |
2899 format.setTimeUnits(CSVFormat::TimeAudioFrames); | 2899 format.setTimeUnits(CSVFormat::TimeAudioFrames); |
2900 for (int i = 0; i < format.getColumnCount(); ++i) { | |
2901 if (format.getColumnQualities()[i] & CSVFormat::ColumnNumeric) { | |
2902 format.setColumnPurpose(i, CSVFormat::ColumnValue); | |
2903 } | |
2904 } | |
2900 | 2905 |
2901 FileOpenStatus status = FileOpenSucceeded; | 2906 FileOpenStatus status = FileOpenSucceeded; |
2902 | 2907 |
2903 ProgressDialog *dialog = new ProgressDialog(tr("Importing audio data..."), | 2908 ProgressDialog *dialog = new ProgressDialog(tr("Importing audio data..."), |
2904 true, 0, this, | 2909 true, 0, this, |