Mercurial > hg > svcore
comparison data/fileio/CodedAudioFileReader.cpp @ 383:94fc0591ea43 1.2-stable
* merge from trunk (1.2 ended up being tracked from trunk, but we may want
this branch for fixes later)
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 10:32:45 +0000 |
parents | 1d656dcda8ef |
children | e6d11871e4c9 |
comparison
equal
deleted
inserted
replaced
349:f39d33b0b265 | 383:94fc0591ea43 |
---|---|
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 |