reinstate Session::loop_changing to avoid problems when locating to start of loop for loop play

This commit is contained in:
Paul Davis 2020-05-13 12:34:22 -06:00
parent daa46c4225
commit abbcc755c1
3 changed files with 5 additions and 10 deletions

View File

@ -1452,6 +1452,7 @@ private:
*/
pframes_t _pframes_since_last_mtc;
bool play_loop;
bool loop_changing;
samplepos_t last_loopend;
boost::scoped_ptr<SessionDirectory> _session_dir;

View File

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

View File

@ -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 ();
}
}