comparison data/model/WritableWaveFileModel.cpp @ 176:570794f6f6a7

* Some fixes to updating of writable wave file models
author Chris Cannam
date Tue, 03 Oct 2006 15:01:50 +0000
parents b0f4555b625e
children bd1260261412
comparison
equal deleted inserted replaced
175:b0f4555b625e 176:570794f6f6a7
75 75
76 m_frameCount += count; 76 m_frameCount += count;
77 77
78 if (!m_model) { 78 if (!m_model) {
79 79
80 m_reader = new WavFileReader(m_writer->getPath()); 80 m_reader = new WavFileReader(m_writer->getPath(), true);
81 if (!m_reader->getError().isEmpty()) { 81 if (!m_reader->getError().isEmpty()) {
82 std::cerr << "WritableWaveFileModel: Error in creating wave file reader" << std::endl; 82 std::cerr << "WritableWaveFileModel: Error in creating wave file reader" << std::endl;
83 delete m_reader; 83 delete m_reader;
84 m_reader = 0; 84 m_reader = 0;
85 return false; 85 return false;
106 } 106 }
107 107
108 void 108 void
109 WritableWaveFileModel::sync() 109 WritableWaveFileModel::sync()
110 { 110 {
111 if (m_reader) m_reader->updateFrameCount(); 111 //!!! use setCompletion instead
112 if (m_reader) m_reader->updateDone();
112 } 113 }
113 114
114 bool 115 bool
115 WritableWaveFileModel::isOK() const 116 WritableWaveFileModel::isOK() const
116 { 117 {