From 6cc54aa1b089dfc27b7028e80d5715a1ac7b0753 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 26 Sep 2024 16:25:39 +0200 Subject: [PATCH] Fix playhead moving beyond loop range When some other transport related session event (anything that requires non_realtime_work_pending, e.g. PostTransportOverWrite) coincides with SessionEvent::AutoLoop, the auto-loop event was removed from the main event queue and executed as one-shot immediate event. While looping the AutoLoop event needs to remain on the main event queue. --- libs/ardour/session_process.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 9d2116192e..e3003127a1 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -911,7 +911,8 @@ Session::process_event (SessionEvent* ev) /* except locates, which we have the capability to handle */ - if (ev->type != SessionEvent::Locate) { + if (ev->type != SessionEvent::Locate && ev->type != SessionEvent::AutoLoop) { + DEBUG_TRACE (DEBUG::SessionEvents, string_compose ("Postponing and moving event to immediate queue: %1 @ %2\n", enum_2_string (ev->type), _transport_sample)); immediate_events.insert (immediate_events.end(), ev); _remove_event (ev); return;