mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 22:55:44 +01:00
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:
parent
07905f0776
commit
ec2628f2ca
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue