From cbbe595162b81a0792810d8b2942c065a22fb5da Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 14 Feb 2022 18:07:54 -0700 Subject: [PATCH] triggerbox: fix end-handling of MIDI triggers (again) If we reach the last event in a MIDI file, the test to enter Playout is whether the last event is *before* not at or later to our computed final beat. --- libs/ardour/triggerbox.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 98a3c45da9..1b253590ee 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -2516,7 +2516,7 @@ MIDITrigger::midi_run (BufferSet& bufs, samplepos_t start_sample, samplepos_t en DEBUG_TRACE (DEBUG::Triggers, string_compose ("%1 reached end, leb %2 les %3 fb %4 dl %5\n", index(), last_event_timeline_beats, last_event_samples, final_beat, data_length)); - if (last_event_timeline_beats >= final_beat) { + if (last_event_timeline_beats < final_beat) { DEBUG_TRACE (DEBUG::Triggers, string_compose ("%1 entering playout because ... leb %2 >= fb %3\n", index(), last_event_timeline_beats, final_beat));