comparison data/fileio/CodedAudioFileReader.cpp @ 375:f1ff248a793e

* Attempt to fix crash caused by race condition on threaded file decode
author Chris Cannam
date Thu, 07 Feb 2008 12:35:43 +0000
parents 1d656dcda8ef
children e6d11871e4c9
comparison
equal deleted inserted replaced
374:7cc6b7b0d819 375:f1ff248a793e
292 CodedAudioFileReader::pushBuffer(float *buffer, size_t sz, bool final) 292 CodedAudioFileReader::pushBuffer(float *buffer, size_t sz, bool final)
293 { 293 {
294 float max = 1.0; 294 float max = 1.0;
295 size_t count = sz * m_channelCount; 295 size_t count = sz * m_channelCount;
296 296
297 if (m_resampler) { 297 if (m_resampler && m_fileRate != 0) {
298 298
299 float ratio = float(m_sampleRate) / float(m_fileRate); 299 float ratio = float(m_sampleRate) / float(m_fileRate);
300 300
301 if (ratio != 1.f) { 301 if (ratio != 1.f) {
302 302