From 58d81f0227b5424b4923119b8858f19c995d8704 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 2 Feb 2022 15:55:12 +0100 Subject: [PATCH] Remove Session::process_can_proceed Auditioning uses dedicated callback method. There is no need to return early when starting to audition. butler_completed_transport_work() which handles PostTransportAudition and switches process-callbacks happens in sync in Session::process(). --- libs/ardour/ardour/session.h | 3 --- libs/ardour/session_process.cc | 15 --------------- 2 files changed, 18 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 167419ed9a..035ae7f327 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1613,8 +1613,6 @@ private: TransportFSM* _transport_fsm; - static const PostTransportWork ProcessCannotProceedMask = PostTransportWork (PostTransportAudition); - GATOMIC_QUAL gint _post_transport_work; /* accessed only atomic ops */ PostTransportWork post_transport_work() const { return (PostTransportWork) g_atomic_int_get (const_cast (&_post_transport_work)); } void set_post_transport_work (PostTransportWork ptw) { g_atomic_int_set (&_post_transport_work, (gint) ptw); } @@ -1836,7 +1834,6 @@ private: int fail_roll (pframes_t nframes); bool non_realtime_work_pending() const { return static_cast(post_transport_work()); } - bool process_can_proceed() const { return !(post_transport_work() & ProcessCannotProceedMask); } MidiControlUI* midi_control_ui; diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index b06439fe8a..a48ebd6aa4 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -490,11 +490,6 @@ Session::process_with_events (pframes_t nframes) send_full_time_code (_transport_sample, nframes); } - if (!process_can_proceed()) { - _silent = true; - return; - } - if (events.empty() || next_event == events.end()) { try_run_lua (nframes); // also during export ?? ->move to process_without_events() /* lua scripts may inject events */ @@ -518,11 +513,6 @@ Session::process_with_events (pframes_t nframes) SessionEvent* this_event; Events::iterator the_next_one; - if (!process_can_proceed()) { - _silent = true; - return; - } - if (!_exporting && config.get_external_sync()) { if (!implement_master_strategy ()) { no_roll (nframes); @@ -656,11 +646,6 @@ Session::process_without_events (pframes_t nframes) bool session_needs_butler = false; samplecnt_t samples_moved; - if (!process_can_proceed()) { - _silent = true; - return; - } - if (!_exporting && config.get_external_sync()) { if (!implement_master_strategy ()) { no_roll (nframes);