Honor "Auto Play" setting when locating from Session::goto_start

Because TransportFSM's MotionState is `WaitingForLocate` when calling
Session::goto_start, transport_was_stopped was set incorrectly
This commit is contained in:
Nikolaus Gullotta 2020-07-29 10:33:29 -05:00
parent 76894b0ac3
commit 13f041536d
No known key found for this signature in database
GPG Key ID: C1580877951565A3

View File

@ -224,6 +224,18 @@ Session::locate (samplepos_t target_sample, bool with_roll, bool with_flush, boo
*/
bool transport_was_stopped = !_transport_fsm->rolling();
/* Prevent rolling in the case of calling Session::goto_start while
SessionConfiguration::get_auto_play == false.
Because _transport_fsm->motion_state == WaitingForLocate after
calling goto_start, we have to check for _transport_fsm->locating()
and with_roll here.
*/
if (!with_roll && _transport_fsm->locating()) {
transport_was_stopped = false;
}
if (!transport_was_stopped &&
(!auto_play_legal || !config.get_auto_play()) &&
!with_roll &&