From abbcc755c1afc597df345a7d15a050ce8342027e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 13 May 2020 12:34:22 -0600 Subject: reinstate Session::loop_changing to avoid problems when locating to start of loop for loop play --- libs/ardour/ardour/session.h | 1 + libs/ardour/session.cc | 2 ++ libs/ardour/session_transport.cc | 12 ++---------- 3 files changed, 5 insertions(+), 10 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 2447b09f99..a54166937e 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1452,6 +1452,7 @@ private: */ pframes_t _pframes_since_last_mtc; bool play_loop; + bool loop_changing; samplepos_t last_loopend; boost::scoped_ptr _session_dir; diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 2b530ba907..f0974bdbf1 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -223,6 +223,7 @@ Session::Session (AudioEngine &eng, , _send_qf_mtc (false) , _pframes_since_last_mtc (0) , play_loop (false) + , loop_changing (false) , last_loopend (0) , _session_dir (new SessionDirectory (fullpath)) , _current_snapshot_name (snapshot_name) @@ -1516,6 +1517,7 @@ Session::auto_loop_changed (Location* location) * by loop-changing, and we do not cancel play loop */ + loop_changing = true; request_locate (location->start(), MustRoll); } else { diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 37dcd91457..2f3c2e44f3 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -1474,16 +1474,8 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished) if (ptw & (PostTransportClearSubstate|PostTransportStop)) { unset_play_range (); - if (!Config->get_loop_is_mode()) { - if (get_play_loop()) { - /* do not unset loop playback if we've just - located back to the start of the loop (i.e. to - prepare to play the loop. - */ - if (_transport_sample != _locations->auto_loop_location()->start()) { - unset_play_loop (); - } - } + if (!Config->get_loop_is_mode() && get_play_loop() && !loop_changing) { + unset_play_loop (); } } -- cgit v1.2.3