Start updating LADSPA plugin for proper timing
This commit is contained in:
@@ -469,7 +469,7 @@ StretchCalculator::calculateSingle(double timeRatio,
|
||||
if (divergence > 1000 || divergence < -1000) {
|
||||
recovery = divergence / ((m_sampleRate / 10.0) / increment);
|
||||
} else if (divergence > 100 || divergence < -100) {
|
||||
recovery = divergence / ((m_sampleRate / 25.0) / increment);
|
||||
recovery = divergence / ((m_sampleRate / 20.0) / increment);
|
||||
} else {
|
||||
recovery = divergence / 4.0;
|
||||
}
|
||||
|
||||
@@ -868,7 +868,8 @@ size_t
|
||||
RubberBandStretcher::Impl::getLatency() const
|
||||
{
|
||||
if (!m_realtime) return 0;
|
||||
return int((m_aWindowSize/2) / m_pitchScale + 1);
|
||||
return lrint((m_aWindowSize/2) / m_pitchScale);
|
||||
// return int(m_aWindowSize/2);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -1154,11 +1154,11 @@ RubberBandStretcher::Impl::writeOutput(RingBuffer<float> &to, float *from, size_
|
||||
// configure(), so we don't want to remove any here.
|
||||
//!!!
|
||||
size_t startSkip = 0;
|
||||
// if (!m_realtime) {
|
||||
if (!m_realtime) {
|
||||
//!!! lock down the latency to this initial value in RT mode
|
||||
startSkip = lrintf((m_sWindowSize/2) / m_pitchScale);
|
||||
// startSkip = m_sWindowSize/2;
|
||||
// }
|
||||
}
|
||||
|
||||
if (outCount > startSkip) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user