From 7f7a5f1c517cde6b769fb5dc65320323802169f6 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 20 Jun 2016 12:49:29 -0400 Subject: Flush shadow port buffer (to the backend port buffer) if filtering wrote anything. --- libs/ardour/async_midi_port.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/ardour/async_midi_port.cc') diff --git a/libs/ardour/async_midi_port.cc b/libs/ardour/async_midi_port.cc index 7614015a2e..abbe0d900a 100644 --- a/libs/ardour/async_midi_port.cc +++ b/libs/ardour/async_midi_port.cc @@ -151,7 +151,10 @@ AsyncMIDIPort::cycle_start (MIDI::pframes_t nframes) } if (shadow_port) { - shadow_midi_filter (mb, shadow_port->get_midi_buffer (nframes)); + MidiBuffer& shadow_buffer (shadow_port->get_midi_buffer (nframes)); + if (shadow_midi_filter (mb, shadow_buffer)) { + shadow_port->flush_buffers (nframes); + } } } } -- cgit v1.2.3