Restore original behaviour of pre-fill/start-skip
This commit is contained in:
@@ -64,7 +64,7 @@ const size_t
|
|||||||
RubberBandStretcher::Impl::m_defaultFftSize = 2048;
|
RubberBandStretcher::Impl::m_defaultFftSize = 2048;
|
||||||
|
|
||||||
int
|
int
|
||||||
RubberBandStretcher::Impl::m_defaultDebugLevel = 2;
|
RubberBandStretcher::Impl::m_defaultDebugLevel = 0;
|
||||||
|
|
||||||
static bool _initialised = false;
|
static bool _initialised = false;
|
||||||
|
|
||||||
@@ -740,12 +740,11 @@ RubberBandStretcher::Impl::configure()
|
|||||||
// number of onset detector chunks will be the number of audio
|
// number of onset detector chunks will be the number of audio
|
||||||
// samples input, divided by the input increment, plus one.
|
// samples input, divided by the input increment, plus one.
|
||||||
|
|
||||||
//!!!
|
|
||||||
// In real-time mode, we don't do this prefill -- it's better to
|
// In real-time mode, we don't do this prefill -- it's better to
|
||||||
// start with a swoosh than introduce more latency, and we don't
|
// start with a swoosh than introduce more latency, and we don't
|
||||||
// want gaps when the ratio changes.
|
// want gaps when the ratio changes.
|
||||||
|
|
||||||
// if (!m_realtime) {
|
if (!m_realtime) {
|
||||||
if (m_debugLevel > 1) {
|
if (m_debugLevel > 1) {
|
||||||
cerr << "Not real time mode: prefilling with " << m_aWindowSize/2 << " samples" << endl;
|
cerr << "Not real time mode: prefilling with " << m_aWindowSize/2 << " samples" << endl;
|
||||||
}
|
}
|
||||||
@@ -753,7 +752,7 @@ RubberBandStretcher::Impl::configure()
|
|||||||
m_channelData[c]->reset();
|
m_channelData[c]->reset();
|
||||||
m_channelData[c]->inbuf->zero(m_aWindowSize/2);
|
m_channelData[c]->inbuf->zero(m_aWindowSize/2);
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1152,12 +1152,10 @@ RubberBandStretcher::Impl::writeOutput(RingBuffer<float> &to, float *from, size_
|
|||||||
// samples, because the first chunk is centred on the start of the
|
// samples, because the first chunk is centred on the start of the
|
||||||
// output. In RT mode we didn't apply any pre-padding in
|
// output. In RT mode we didn't apply any pre-padding in
|
||||||
// configure(), so we don't want to remove any here.
|
// configure(), so we don't want to remove any here.
|
||||||
//!!!
|
|
||||||
size_t startSkip = 0;
|
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 = lrintf((m_sWindowSize/2) / m_pitchScale);
|
||||||
// startSkip = m_sWindowSize/2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outCount > startSkip) {
|
if (outCount > startSkip) {
|
||||||
|
|||||||
Reference in New Issue
Block a user