avoid double-locate call when locating-while-stopped

Session::locate() used TransportFSM::stopped() to determine if realtime stop was required. But this would
return false, since the motion state at that time is WaitingForLocate. So invert the test and use
!TransportFSM::rolling
This commit is contained in:
Paul Davis
2020-02-21 15:48:53 -07:00
parent db3995c559
commit 541ea5ccad

View File

@@ -228,7 +228,7 @@ Session::locate (samplepos_t target_sample, bool with_roll, bool with_flush, boo
/* it is important here that we use the internal state of the transport
FSM, not the public facing result of ::transport_rolling()
*/
bool transport_was_stopped = _transport_fsm->stopped();
bool transport_was_stopped = !_transport_fsm->rolling();
if (!transport_was_stopped &&
(!auto_play_legal || !config.get_auto_play()) &&