Mercurial > hg > svapp
comparison framework/SVFileReader.cpp @ 479:6f475df6f833 recording
Make WritableWaveFileModel a true WaveFileModel (and ReadOnlyWaveFileModel the other sort of it). Enable recording from an empty session using that.
author | Chris Cannam |
---|---|
date | Wed, 19 Aug 2015 17:03:31 +0100 |
parents | dc1a360f2b69 |
children | aecd5bdfc71f |
comparison
equal
deleted
inserted
replaced
478:1f86bf6644b8 | 479:6f475df6f833 |
---|---|
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 } |