Mercurial > hg > svcore
diff data/fileio/CodedAudioFileReader.cpp @ 1329:5b04b8bc88ca 3.0-integration
Update to current bqresample API
author | Chris Cannam |
---|---|
date | Thu, 15 Dec 2016 08:58:43 +0000 |
parents | 54af1e21705c |
children | 97deefd38060 |
line wrap: on
line diff
--- a/data/fileio/CodedAudioFileReader.cpp Tue Dec 13 16:06:28 2016 +0000 +++ b/data/fileio/CodedAudioFileReader.cpp Thu Dec 15 08:58:43 2016 +0000 @@ -144,10 +144,13 @@ } if (m_fileRate != m_sampleRate) { SVDEBUG << "CodedAudioFileReader: resampling " << m_fileRate << " -> " << m_sampleRate << endl; - m_resampler = new breakfastquay::Resampler - (breakfastquay::Resampler::FastestTolerable, - m_channelCount, - int(m_cacheWriteBufferFrames)); + + breakfastquay::Resampler::Parameters params; + params.quality = breakfastquay::Resampler::FastestTolerable; + params.maxBufferSize = int(m_cacheWriteBufferFrames); + params.initialSampleRate = m_fileRate; + m_resampler = new breakfastquay::Resampler(params, m_channelCount); + double ratio = m_sampleRate / m_fileRate; m_resampleBufferFrames = int(ceil(double(m_cacheWriteBufferFrames) * ratio + 1));