X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudio_port.cc;h=2fecbf9392c1f5b9600da044f0678c9315164d0d;hb=848db8fbd56dbae1ad286b7791dba293462b5f43;hp=6a86360b6937522333d77d84daa0fe5c3f0322cb;hpb=d074bc586e494d7dd83d415a487195a477095a4f;p=ardour.git diff --git a/libs/ardour/audio_port.cc b/libs/ardour/audio_port.cc index 6a86360b69..2fecbf9392 100644 --- a/libs/ardour/audio_port.cc +++ b/libs/ardour/audio_port.cc @@ -56,14 +56,11 @@ AudioPort::cycle_start (pframes_t nframes) } void -AudioPort::cycle_end (pframes_t) +AudioPort::cycle_end (pframes_t nframes) { if (sends_output() && !_buffer->written()) { - /* we can't use nframes here because the current buffer capacity may - be shorter than the full buffer size if we split the cycle. - */ - if (_buffer->capacity () > 0) { - _buffer->silence (_buffer->capacity()); + if (_buffer->capacity() >= nframes) { + _buffer->silence (nframes); } } }