From 00aec4f91ec663d8c48dbc778cc08e8776a0ba50 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Sun, 23 Jan 2022 20:15:12 -0600 Subject: [PATCH] Trigger page: changes to cue-recording behavior (see comments) --- libs/ardour/session_transport.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index d3452a2b5a..d1c170f651 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -2088,13 +2088,15 @@ Session::actual_speed() const void Session::flush_cue_recording () { - if (!TriggerBox::cue_records.read_space()) { + /* if the user canceled cue recording before stopping *and* didn't record any cues, leave cues unchanged */ + if (!TriggerBox::cue_recording() && !TriggerBox::cue_records.read_space()) { return; } CueRecord cr; TempoMap::SharedPtr tmap (TempoMap::use()); + /* we will delete the cues we rolled over, even if the user never wrote any new cues (??)*/ _locations->clear_cue_markers (_last_roll_location, _transport_sample); while (TriggerBox::cue_records.read (&cr, 1) == 1) { @@ -2115,4 +2117,7 @@ Session::flush_cue_recording () /* scheduled sync of cue markers in RT thread */ cue_marker_change (0); + + /* disarm the cues from recording when we finish our pass */ + TriggerBox::set_cue_recording(false); }