* Fix under/overruns in ladspa plugin

This commit is contained in:
Chris Cannam
2008-07-04 14:19:32 +00:00
parent 59a160eb3f
commit 86462dbd9f
9 changed files with 145 additions and 71 deletions

View File

@@ -236,9 +236,27 @@ RubberBandStretcher::Impl::setPitchScale(double fs)
}
if (fs == m_pitchScale) return;
bool was1 = (m_pitchScale == 1.f);
bool rbs = resampleBeforeStretching();
m_pitchScale = fs;
reconfigure();
if (!(m_options & OptionPitchHighConsistency) &&
(was1 || resampleBeforeStretching() != rbs) &&
m_pitchScale != 1.f) {
cerr << "reset resampler" << endl;
// resampling mode has changed
for (int c = 0; c < m_channels; ++c) {
if (m_channelData[c]->resampler) {
m_channelData[c]->resampler->reset();
}
}
}
}
double