Mercurial > hg > svcore
diff data/model/WaveFileModel.cpp @ 429:6036b38177e2
* Fix crash when running Generator
author | Chris Cannam |
---|---|
date | Wed, 18 Jun 2008 13:40:10 +0000 |
parents | 52303ec15cd2 |
children | d3faa6447c5b |
line wrap: on
line diff
--- a/data/model/WaveFileModel.cpp Tue Jun 17 16:07:56 2008 +0000 +++ b/data/model/WaveFileModel.cpp Wed Jun 18 13:40:10 2008 +0000 @@ -188,6 +188,10 @@ // This is used for e.g. audio playback. // Could be much more efficient (although compiler optimisation will help) +#ifdef DEBUG_WAVE_FILE_MODEL + std::cout << "WaveFileModel::getData[" << this << "]: " << channel << ", " << start << ", " << count << ", " << buffer << std::endl; +#endif + if (start >= m_startFrame) { start -= m_startFrame; } else { @@ -246,6 +250,10 @@ WaveFileModel::getData(int channel, size_t start, size_t count, double *buffer) const { +#ifdef DEBUG_WAVE_FILE_MODEL + std::cout << "WaveFileModel::getData(double)[" << this << "]: " << channel << ", " << start << ", " << count << ", " << buffer << std::endl; +#endif + if (start > m_startFrame) { start -= m_startFrame; } else { @@ -300,6 +308,10 @@ size_t start, size_t count, float **buffer) const { +#ifdef DEBUG_WAVE_FILE_MODEL + std::cout << "WaveFileModel::getData[" << this << "]: " << fromchannel << "," << tochannel << ", " << start << ", " << count << ", " << buffer << std::endl; +#endif + size_t channels = getChannelCount(); if (fromchannel > tochannel) {