From a7d7fae434dc32e6787dfe54d1c30e0bccc660bd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 7 Mar 2011 05:34:19 +0000 Subject: Apply LV2 UI MIDI event fix from Lars Luthman (ticket #651) with minor changes. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3048 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/InputPort.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/engine/InputPort.cpp') diff --git a/src/engine/InputPort.cpp b/src/engine/InputPort.cpp index 0cd6e87a..f82b522a 100644 --- a/src/engine/InputPort.cpp +++ b/src/engine/InputPort.cpp @@ -210,7 +210,15 @@ InputPort::pre_process(Context& context) void InputPort::post_process(Context& context) { - _set_by_user = false; + if (_set_by_user) { + if (buffer_type() == PortType::EVENTS) { + // Clear events received via a SetPortValue + for (uint32_t v = 0; v < _poly; ++v) { + buffer(v)->clear(); + } + } + _set_by_user = false; + } } -- cgit v1.2.1