From 4ef99150acbc92612a9aafbce7b6f73614ed63dc Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Wed, 28 Sep 2022 22:33:43 +0200 Subject: jack midi input port should not clear the buffer --- drumgizmo/input/jackmidi.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drumgizmo/input/jackmidi.cc b/drumgizmo/input/jackmidi.cc index 445678b..39aebf8 100644 --- a/drumgizmo/input/jackmidi.cc +++ b/drumgizmo/input/jackmidi.cc @@ -122,6 +122,12 @@ void JackMidiInputEngine::process(jack_nframes_t num_frames) jack_midi_event_get(&event, buffer, i); processNote(event.buffer, event.size, event.time, events); } - jack_midi_clear_buffer(buffer); + + // Disable clear buffer on input port because for Edrumulus usage we need that + // two clients use the some output buffer and if we clear it here, the other + // application will not get any MIDI input signal. Usually, the output port + // is responsible for clearing the buffer, not the input port. + //jack_midi_clear_buffer(buffer); + pos += num_frames; } -- cgit v1.2.3