diff options
-rw-r--r-- | libs/ardour/session_transport.cc | 8 | ||||
-rw-r--r-- | libs/ardour/transport_fsm.cc | 21 |
2 files changed, 17 insertions, 12 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index ea93bba3bc..1b66dbff11 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -384,13 +384,7 @@ Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush, if (need_butler) { TFSM_EVENT (TransportFSM::ButlerRequired); } else { - if (!for_loop_end) { - /* loop end locates do not trigger a state transition - in the TFSM, because we do not change transport - state nor do we wait for the butler. - */ - TFSM_EVENT (TransportFSM::LocateDone); - } + TFSM_EVENT (TransportFSM::LocateDone); } loop_changing = false; diff --git a/libs/ardour/transport_fsm.cc b/libs/ardour/transport_fsm.cc index 00645c8905..1bba909622 100644 --- a/libs/ardour/transport_fsm.cc +++ b/libs/ardour/transport_fsm.cc @@ -188,6 +188,7 @@ TransportFSM::bad_transition (Event const & ev) { error << "bad transition, current state = " << current_state() << " event = " << enum_2_string (ev.type) << endmsg; std::cerr << "bad transition, current state = " << current_state() << " event = " << enum_2_string (ev.type) << std::endl; + PBD::stacktrace (std::cerr, 30); } bool @@ -261,11 +262,21 @@ TransportFSM::process_event (Event& ev, bool already_deferred, bool& deferred) break; case Rolling: if (ev.with_loop) { - /* no state transitions. Just do a realtime - locate and continue rolling. Note that - ev.with_roll is ignored and assumed to be - true because we're looping. - */ + /* we will finish the locate synchronously, so + * that after returning from + * ::locate_for_loop() we will already have + * received (and re-entrantly handled) + * LocateDone and returned back to Rolling. + * + * This happens because we only need to do a + * realtime locate and continue rolling. No + * disk I/O is required - the loop is + * automically present in buffers already. + * + * Note that ev.with_roll is ignored and + * assumed to be true because we're looping. + */ + transition (WaitingForLocate); locate_for_loop (ev); } else { transition (DeclickToLocate); |