From 617697a823db734cb4845f000fc48852dfe7f4b5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 4 Feb 2022 19:32:34 +0100 Subject: [PATCH] Fix playback of initial notes during MIDI audition --- libs/ardour/session.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 3603b7c8c0..06f0e8b4f2 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -5354,6 +5354,19 @@ Session::non_realtime_set_audition () assert (pending_audition_region); auditioner->audition_region (pending_audition_region); pending_audition_region.reset (); + + /* clear any SessionEvent::Overwrite that the DR may have scheduled + * due to PL modification. audition_region() will have called + * overwrite_existing_buffers(). + * + * Otherwise the event will be handled in the future by + * Session::process_audition () after !non_realtime_work_pending(). + * This will cause the DiskReader::run_must_resolve = true, and the + * Note-tracker will kill any active notes, while auditioning + * is already in progress. + */ + _clear_event_type (SessionEvent::Overwrite); + AuditionActive (true); /* EMIT SIGNAL */ }