Mercurial > hg > svcore
diff data/fileio/CodedAudioFileReader.cpp @ 398:be49bf95d4a5
* Fix hang when using more than one consecutive coded audio file reader in
decode-at-once mode
author | Chris Cannam |
---|---|
date | Wed, 26 Mar 2008 14:35:03 +0000 |
parents | e6d11871e4c9 |
children | 3012af787e4a |
line wrap: on
line diff
--- a/data/fileio/CodedAudioFileReader.cpp Wed Mar 26 11:18:17 2008 +0000 +++ b/data/fileio/CodedAudioFileReader.cpp Wed Mar 26 14:35:03 2008 +0000 @@ -79,7 +79,7 @@ void CodedAudioFileReader::endSerialised() { -// std::cerr << "CodedAudioFileReader::endSerialised" << std::endl; + std::cerr << "CodedAudioFileReader::endSerialised" << std::endl; delete m_serialiser; m_serialiser = 0; @@ -107,7 +107,7 @@ m_cacheWriteBufferSize); float ratio = float(m_sampleRate) / float(m_fileRate); m_resampleBuffer = new float - [lrintf(ceilf(m_cacheWriteBufferSize * m_channelCount * ratio))]; + [lrintf(ceilf(m_cacheWriteBufferSize * m_channelCount * ratio + 1))]; } m_cacheWriteBuffer = new float[m_cacheWriteBufferSize * m_channelCount];