From c870c22c8730690cc2f7828ddfcf20999eba1740 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 5 Feb 2022 19:16:00 +0100 Subject: [PATCH] Process Audition: process events before run Calls DR::set_pending_overwrite() sets DR::run_must_resolve before the first run. Previously this variable was set after the first ::run, which resulted in notes at the beginning of audition to be cut short. --- libs/ardour/session_process.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index b06439fe8a..d8c049c04a 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -744,19 +744,6 @@ Session::process_audition (pframes_t nframes) _process_graph->swap_process_chain (); } - /* run the auditioner, and if it says we need butler service, ask for it */ - - if (auditioner->play_audition (nframes) > 0) { - DEBUG_TRACE (DEBUG::Butler, "auditioner needs butler, call it\n"); - _butler->summon (); - } - - /* if using a monitor section, run it because otherwise we don't hear anything */ - - if (_monitor_out && auditioner->needs_monitor()) { - _monitor_out->monitor_run (_transport_sample, _transport_sample + nframes, nframes); - } - /* handle pending events */ while (pending_events.read (&ev, 1) == 1) { @@ -774,6 +761,19 @@ Session::process_audition (pframes_t nframes) process_event (ev); } + /* run the auditioner, and if it says we need butler service, ask for it */ + + if (auditioner->play_audition (nframes) > 0) { + DEBUG_TRACE (DEBUG::Butler, "auditioner needs butler, call it\n"); + _butler->summon (); + } + + /* if using a monitor section, run it because otherwise we don't hear anything */ + + if (_monitor_out && auditioner->needs_monitor()) { + _monitor_out->monitor_run (_transport_sample, _transport_sample + nframes, nframes); + } + if (!auditioner->auditioning()) { /* auditioner no longer active, so go back to the normal process callback */ process_function = &Session::process_with_events;