diff options
author | Robin Gareus <robin@gareus.org> | 2019-10-01 13:42:34 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-10-01 13:42:34 +0200 |
commit | ec2628f2ca1249d89b4049045a6ff05d39bf474b (patch) | |
tree | 02e1a61070f72138c478db55ddc213b63dafb8f2 /libs | |
parent | 07905f0776ea783b1eaa1ce56a0121b263640ca0 (diff) |
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.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/delayline.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/delayline.cc b/libs/ardour/delayline.cc index 341a3b53e4..cf7b3d4364 100644 --- a/libs/ardour/delayline.cc +++ b/libs/ardour/delayline.cc @@ -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); |