diff options
author | David Robillard <d@drobilla.net> | 2008-05-20 05:21:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-05-20 05:21:43 +0000 |
commit | 34093b89423e7d195972e68676c73853228d35f6 (patch) | |
tree | efaad4b4a3dd095f52cc90fd2af7db6c0dc33c40 /src/libs/engine/InputPort.cpp | |
parent | 240f6f0c4e6f5d2770fd166f162df41906e2e230 (diff) | |
download | ingen-34093b89423e7d195972e68676c73853228d35f6.tar.gz ingen-34093b89423e7d195972e68676c73853228d35f6.tar.bz2 ingen-34093b89423e7d195972e68676c73853228d35f6.zip |
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
Diffstat (limited to 'src/libs/engine/InputPort.cpp')
-rw-r--r-- | src/libs/engine/InputPort.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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); |