summaryrefslogtreecommitdiff
path: root/libs/ardour/transport_fsm.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-11-04 14:35:18 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-11-04 14:35:18 -0700
commit7d67789a3f407e154205e6a81232d43bd66fc7d0 (patch)
tree0328d2f71b567603f6afcab896b62f3d9952e533 /libs/ardour/transport_fsm.cc
parent62c4e88a9d8f4a7b019243fe9a10830b1da0150c (diff)
fix a bad transition in the transportFSM.
Diffstat (limited to 'libs/ardour/transport_fsm.cc')
-rw-r--r--libs/ardour/transport_fsm.cc21
1 files changed, 16 insertions, 5 deletions
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);