Mercurial > hg > svcore
changeset 1329:5b04b8bc88ca 3.0-integration
Update to current bqresample API
author | Chris Cannam |
---|---|
date | Thu, 15 Dec 2016 08:58:43 +0000 |
parents | 7d24f92158a7 |
children | 491a992f856e |
files | data/fileio/CodedAudioFileReader.cpp |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
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));