From 34093b89423e7d195972e68676c73853228d35f6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 20 May 2008 05:21:43 +0000 Subject: Fix direct midi in -> midi out connections in root patch with plugins present. Fix Jack MIDI output. Attempted fixes for LV2 UI MIDI event writing, but.. still not working? git-svn-id: http://svn.drobilla.net/lad/ingen@1223 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/InputPort.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/libs/engine/InputPort.cpp') diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp index 7a90bc21..052ccde0 100644 --- a/src/libs/engine/InputPort.cpp +++ b/src/libs/engine/InputPort.cpp @@ -155,6 +155,11 @@ InputPort::is_connected_to(const OutputPort* port) const void InputPort::pre_process(ProcessContext& context) { + // If value has been set (e.g. events pushed) by the user, + // don't do anything this cycle to avoid smashing the value + if (_set_by_user) + return; + bool do_mixdown = true; if (_connections.size() == 0) { @@ -221,8 +226,8 @@ InputPort::pre_process(ProcessContext& context) assert(_poly == 1); // FIXME - //if (_connections.size() > 1) - // cerr << "WARNING: MIDI mixing not implemented, only first connection used." << endl; + if (_connections.size() > 1) + cerr << "WARNING: MIDI mixing not implemented, only first connection used." << endl; // Copy first connection _buffers->at(0)->copy( @@ -239,6 +244,8 @@ InputPort::post_process(ProcessContext& context) // Prepare for next cycle for (uint32_t i=0; i < _poly; ++i) buffer(i)->prepare_write(context.nframes()); + + _set_by_user = false; /*if (_broadcast && (_type == DataType::CONTROL)) { const Sample value = ((AudioBuffer*)(*_buffers)[0])->value_at(0); -- cgit v1.2.1