X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudio_port.cc;h=240224ea5e5b33112ae3e72f5e6c21ca5851eac8;hb=dbe00236ff5cfce8f539cf84a6d34b353542dfff;hp=987d99e25ae66d4a2a2c6527073f30b5b7d2a589;hpb=5dd3e39f9ef98d82afef240b29506948e038b215;p=ardour.git diff --git a/libs/ardour/audio_port.cc b/libs/ardour/audio_port.cc index 987d99e25a..240224ea5e 100644 --- a/libs/ardour/audio_port.cc +++ b/libs/ardour/audio_port.cc @@ -20,10 +20,9 @@ #include "pbd/stacktrace.h" +#include "ardour/audio_buffer.h" #include "ardour/audio_port.h" -#include "ardour/audioengine.h" #include "ardour/data_type.h" -#include "ardour/audio_buffer.h" using namespace ARDOUR; using namespace std; @@ -53,10 +52,10 @@ AudioPort::cycle_start (pframes_t nframes) } void -AudioPort::cycle_end (pframes_t nframes) +AudioPort::cycle_end (pframes_t) { if (sends_output() && !_buffer->written()) { - /* we can't use nframes here because the current buffer capacity may + /* 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) { @@ -74,14 +73,18 @@ AudioBuffer& AudioPort::get_audio_buffer (pframes_t nframes) { /* caller must hold process lock */ - _buffer->set_data ((Sample *) jack_port_get_buffer (_jack_port, _cycle_nframes) + - _global_port_buffer_offset + _port_buffer_offset, nframes); + _buffer->set_data ((Sample *) jack_port_get_buffer (_jack_port, _cycle_nframes) + + _global_port_buffer_offset + _port_buffer_offset, nframes); return *_buffer; } -size_t -AudioPort::raw_buffer_size (pframes_t nframes) const +Sample* +AudioPort::engine_get_whole_audio_buffer () { - return nframes * sizeof (Sample); + /* caller must hold process lock */ + return (Sample *) jack_port_get_buffer (_jack_port, _cycle_nframes); } + + +