comparison framework/SVFileReader.cpp @ 481:52c0aff69478 3.0-integration

Merge from branch recording
author Chris Cannam
date Thu, 20 Aug 2015 13:15:19 +0100
parents 6f475df6f833
children aecd5bdfc71f
comparison
equal deleted inserted replaced
472:6ec35c1690c0 481:52c0aff69478
24 #include "data/fileio/AudioFileReaderFactory.h" 24 #include "data/fileio/AudioFileReaderFactory.h"
25 #include "data/fileio/FileSource.h" 25 #include "data/fileio/FileSource.h"
26 26
27 #include "data/fileio/FileFinder.h" 27 #include "data/fileio/FileFinder.h"
28 28
29 #include "data/model/WaveFileModel.h" 29 #include "data/model/ReadOnlyWaveFileModel.h"
30 #include "data/model/EditableDenseThreeDimensionalModel.h" 30 #include "data/model/EditableDenseThreeDimensionalModel.h"
31 #include "data/model/SparseOneDimensionalModel.h" 31 #include "data/model/SparseOneDimensionalModel.h"
32 #include "data/model/SparseTimeValueModel.h" 32 #include "data/model/SparseTimeValueModel.h"
33 #include "data/model/NoteModel.h" 33 #include "data/model/NoteModel.h"
34 #include "data/model/FlexiNoteModel.h" 34 #include "data/model/FlexiNoteModel.h"
487 Preferences::getInstance()->getResampleOnLoad()) { 487 Preferences::getInstance()->getResampleOnLoad()) {
488 WaveFileModel *mm = m_document->getMainModel(); 488 WaveFileModel *mm = m_document->getMainModel();
489 if (mm) rate = mm->getSampleRate(); 489 if (mm) rate = mm->getSampleRate();
490 } 490 }
491 491
492 model = new WaveFileModel(file, rate); 492 model = new ReadOnlyWaveFileModel(file, rate);
493 if (!model->isOK()) { 493 if (!model->isOK()) {
494 delete model; 494 delete model;
495 model = 0; 495 model = 0;
496 } 496 }
497 } 497 }