Use proper parameters for processing mode

This commit is contained in:
Chris Cannam
2021-05-12 17:29:26 +01:00
parent c1fd6fe6a5
commit 6aeb713921

View File

@@ -674,8 +674,16 @@ RubberBandStretcher::Impl::configure()
Resampler::Parameters params; Resampler::Parameters params;
params.quality = Resampler::FastestTolerable; params.quality = Resampler::FastestTolerable;
params.dynamism = Resampler::RatioMostlyFixed;
params.ratioChange = Resampler::SmoothRatioChange; if (m_realtime) {
params.dynamism = Resampler::RatioOftenChanging;
params.ratioChange = Resampler::SmoothRatioChange;
} else {
// ratio can't be changed in offline mode
params.dynamism = Resampler::RatioMostlyFixed;
params.ratioChange = Resampler::SuddenRatioChange;
}
params.maxBufferSize = 4096 * 16; params.maxBufferSize = 4096 * 16;
params.debugLevel = m_debugLevel; params.debugLevel = m_debugLevel;
@@ -820,7 +828,7 @@ RubberBandStretcher::Impl::reconfigure()
Resampler::Parameters params; Resampler::Parameters params;
params.quality = Resampler::FastestTolerable; params.quality = Resampler::FastestTolerable;
params.dynamism = Resampler::RatioMostlyFixed; params.dynamism = Resampler::RatioOftenChanging;
params.ratioChange = Resampler::SmoothRatioChange; params.ratioChange = Resampler::SmoothRatioChange;
params.maxBufferSize = m_sWindowSize; params.maxBufferSize = m_sWindowSize;
params.debugLevel = m_debugLevel; params.debugLevel = m_debugLevel;