From 7455b99b45fc06cf836655fb225f6592bf1fc9d6 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 30 Sep 2024 13:17:15 -0600 Subject: [PATCH] account for clip recording when computing monitoring state --- libs/ardour/route.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index ca4dc2f87c..478bf2dd50 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -6188,6 +6188,7 @@ Route::monitoring_state () const bool const roll = _session.transport_state_rolling (); bool const auto_input = _session.config.get_auto_input (); + bool const clip_rec = _triggerbox && _triggerbox->record_enabled(); bool const track_rec = _disk_writer->record_enabled (); bool session_rec; @@ -6217,14 +6218,14 @@ Route::monitoring_state () const session_rec = _session.get_record_enabled(); } - if (track_rec) { + if (track_rec || clip_rec) { - if (!session_rec && roll && auto_input) { + if (!clip_rec && (!session_rec && roll && auto_input)) { return auto_monitor_disk | get_input_monitoring_state (false, false); } else { /* recording */ const samplecnt_t prtl = _session.preroll_record_trim_len (); - if (session_rec && roll && prtl > 0 && _disk_writer->get_captured_samples () < prtl) { + if (!clip_rec && session_rec && roll && prtl > 0 && _disk_writer->get_captured_samples () < prtl) { /* CUE monitor during pre-roll */ return auto_monitor_disk | (get_input_monitoring_state (true, false) & auto_monitor_mask); }