diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-11-29 22:26:33 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-11-29 22:26:33 -0500 |
commit | d1cc7e5a50e2144d7aea01bc5eceed6657513c1b (patch) | |
tree | ae923ee081a7b19a1f3cc29da50dd12de5bd5596 /libs/ardour/audio_port.cc | |
parent | 0c4457fa8361d7678b09ec5911917750e7ade67e (diff) |
fix up a bunch of confusion regarding the size/capacity/allocation of audio & midi buffers
Diffstat (limited to 'libs/ardour/audio_port.cc')
-rw-r--r-- | libs/ardour/audio_port.cc | 9 |
1 files changed, 3 insertions, 6 deletions
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); } } } |