Fix thinko in cd5f70e69a (delayline buffer resize)
The delay-time itself can change arbitrarily, but the buffer-size never shrinks. If the buffersize grows it means that the new delay is longer than the current one (or at least as large as any pending, not yet active delay). This is important for the mechanism that adjusts the read-pointer to the new buffer-size.
This commit is contained in:
@@ -322,7 +322,6 @@ void
|
||||
DelayLine::allocate_pending_buffers (samplecnt_t signal_delay, ChanCount const& cc)
|
||||
{
|
||||
assert (signal_delay >= 0);
|
||||
assert (signal_delay >= _pending_delay);
|
||||
samplecnt_t rbs = signal_delay + MAX_BUFFER_SIZE + 1;
|
||||
rbs = std::max (_bsiz, rbs);
|
||||
|
||||
@@ -367,6 +366,7 @@ DelayLine::allocate_pending_buffers (samplecnt_t signal_delay, ChanCount const&
|
||||
}
|
||||
}
|
||||
|
||||
assert (signal_delay >= _pending_delay);
|
||||
assert ((_roff <= (_woff + signal_delay - _pending_delay) & (rbs -1)) || offset > 0);
|
||||
_roff += offset;
|
||||
assert (_roff < rbs);
|
||||
|
||||
Reference in New Issue
Block a user