avoid a locate-to-loop-start from cancelling looping

This commit is contained in:
Paul Davis 2019-12-08 17:00:30 -07:00
parent 2543a60f88
commit 109486419e

View File

@ -1430,24 +1430,26 @@ Session::auto_loop_changed (Location* location)
if (play_loop) {
/* Set this so that when/if we have to stop the
* transport for a locate, we know that it is triggered
* by loop-changing, and we do not cancel play loop
*/
loop_changing = true;
if (_transport_sample < location->start() || _transport_sample > location->end()) {
// new loop range excludes current transport
// sample => relocate to beginning of loop and roll.
/* new loop range excludes current transport
* sample => relocate to beginning of loop and roll.
*/
/* Set this so that when/if we have to stop the
* transport for a locate, we know that it is triggered
* by loop-changing, and we do not cancel play loop
*/
loop_changing = true;
request_locate (location->start(), true);
} else {
// schedule a buffer overwrite to refill buffers with the new loop.
request_overwrite_buffer (boost::shared_ptr<Track>());
}
// schedule a buffer overwrite to refill buffers with the new loop.
request_overwrite_buffer (boost::shared_ptr<Track>());
}
} else {