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.
This commit is contained in:
Robin Gareus 2022-02-05 19:16:00 +01:00
parent 0db261cf64
commit c870c22c87
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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;