comparison data/model/WritableWaveFileModel.cpp @ 1122:b9faee02afa5 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 9f4505ac9072
children 133747edd76c
comparison
equal deleted inserted replaced
1117:020277bfafcb 1122:b9faee02afa5
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #include "WritableWaveFileModel.h" 16 #include "WritableWaveFileModel.h"
17 17
18 #include "ReadOnlyWaveFileModel.h"
19
18 #include "base/TempDirectory.h" 20 #include "base/TempDirectory.h"
19 #include "base/Exceptions.h" 21 #include "base/Exceptions.h"
20 22
21 #include "fileio/WavFileWriter.h" 23 #include "fileio/WavFileWriter.h"
22 #include "fileio/WavFileReader.h" 24 #include "fileio/WavFileReader.h"
72 delete m_reader; 74 delete m_reader;
73 m_reader = 0; 75 m_reader = 0;
74 return; 76 return;
75 } 77 }
76 78
77 m_model = new WaveFileModel(source, m_reader); 79 m_model = new ReadOnlyWaveFileModel(source, m_reader);
78 if (!m_model->isOK()) { 80 if (!m_model->isOK()) {
79 cerr << "WritableWaveFileModel: Error in creating wave file model" << endl; 81 cerr << "WritableWaveFileModel: Error in creating wave file model" << endl;
80 delete m_model; 82 delete m_model;
81 m_model = 0; 83 m_model = 0;
82 delete m_reader; 84 delete m_reader;