comparison data/model/WritableWaveFileModel.cpp @ 225:185454896a76

* Return ranges from RangeSummarisableTimeValueModel::getRanges by references instead of by return value. Trying to isolate a Win32 problem.
author Chris Cannam
date Wed, 07 Feb 2007 14:21:14 +0000
parents 91fdc752e540
children 96a6dd889c68
comparison
equal deleted inserted replaced
224:8ff1ad4e7a9c 225:185454896a76
165 // std::cerr << "WritableWaveFileModel::getValues(" << channel << ", " 165 // std::cerr << "WritableWaveFileModel::getValues(" << channel << ", "
166 // << start << ", " << end << "): calling model" << std::endl; 166 // << start << ", " << end << "): calling model" << std::endl;
167 return m_model->getValues(channel, start, end, buffer); 167 return m_model->getValues(channel, start, end, buffer);
168 } 168 }
169 169
170 WritableWaveFileModel::RangeBlock 170 void
171 WritableWaveFileModel::getRanges(size_t channel, size_t start, size_t end, 171 WritableWaveFileModel::getRanges(size_t channel, size_t start, size_t end,
172 RangeBlock &ranges,
172 size_t &blockSize) const 173 size_t &blockSize) const
173 { 174 {
174 if (!m_model || m_model->getChannelCount() == 0) return RangeBlock(); 175 ranges.clear();
175 return m_model->getRanges(channel, start, end, blockSize); 176 if (!m_model || m_model->getChannelCount() == 0) return;
177 m_model->getRanges(channel, start, end, ranges, blockSize);
176 } 178 }
177 179
178 WritableWaveFileModel::Range 180 WritableWaveFileModel::Range
179 WritableWaveFileModel::getRange(size_t channel, size_t start, size_t end) const 181 WritableWaveFileModel::getRange(size_t channel, size_t start, size_t end) const
180 { 182 {