- if (_flags & JackPortIsOutput) {
- const bool silent = _buffer.silent();
- // FIXME: do nothing, we can cache the value (but capacity needs to be set for MIDI)
- _buffer.set_data((Sample*)jack_port_get_buffer (_port, nframes), nframes);
- if (silent) {
- _buffer.silence(nframes);
+ /* caller must hold process lock */
+
+ if (_ext_port) {
+ _ext_port->cycle_start (nframes, offset);
+ }
+
+ if (_flags & IsInput) {
+
+ if (_ext_port) {
+ _buffer->read_from (dynamic_cast<BaseAudioPort*>(_ext_port)->get_audio_buffer(), nframes, offset);
+
+ if (!_connections.empty()) {
+ (*_mixdown) (_connections, _buffer, nframes, offset, false);
+ }
+
+ } else {
+
+ if (_connections.empty()) {
+ _buffer->silence (nframes, offset);
+ } else {
+ (*_mixdown) (_connections, _buffer, nframes, offset, true);
+ }