summaryrefslogtreecommitdiff
path: root/libs/ardour/session_transport.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-11-01 15:56:06 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-11-01 15:56:06 -0600
commit833927a4ea3bb821bedf4ef8c0779f0a0656f4b1 (patch)
treec37ed38e6f43ce08edbdaf4a0aff4356567d5cf8 /libs/ardour/session_transport.cc
parentc3d68338ade1affb8bdf7cb0b6c7bbd24c6fa318 (diff)
don't send TFSM event LocateDone after a locate-for-loop-end
See comment for explanation
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r--libs/ardour/session_transport.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 30590610dc..369c991a2f 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -162,7 +162,7 @@ Session::realtime_stop (bool abort, bool clear_state)
}
void
-Session::locate (samplepos_t target_sample, bool with_roll, bool with_flush, bool for_loop_enabled, bool force, bool with_mmc)
+Session::locate (samplepos_t target_sample, bool with_roll, bool with_flush, bool for_loop_end, bool force, bool with_mmc)
{
ENSURE_PROCESS_THREAD;
@@ -186,7 +186,7 @@ Session::locate (samplepos_t target_sample, bool with_roll, bool with_flush, boo
will use the incorrect _transport_sample and report an old
and incorrect time to Jack transport
*/
- do_locate (target_sample, with_roll, with_flush, for_loop_enabled, force, with_mmc);
+ do_locate (target_sample, with_roll, with_flush, for_loop_end, force, with_mmc);
}
/* tell JACK to change transport position, and we will
@@ -202,13 +202,13 @@ Session::locate (samplepos_t target_sample, bool with_roll, bool with_flush, boo
}
} else {
- do_locate (target_sample, with_roll, with_flush, for_loop_enabled, force, with_mmc);
+ do_locate (target_sample, with_roll, with_flush, for_loop_end, force, with_mmc);
}
}
/** @param with_mmc true to send a MMC locate command when the locate is done */
void
-Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush, bool for_loop_enabled, bool force, bool with_mmc)
+Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush, bool for_loop_end, bool force, bool with_mmc)
{
ENSURE_PROCESS_THREAD;
@@ -222,10 +222,10 @@ Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush,
* changes in the value of _transport_sample.
*/
- DEBUG_TRACE (DEBUG::Transport, string_compose ("rt-locate to %1, roll %2 flush %3 loop-enabled %4 force %5 mmc %6\n",
- target_sample, with_roll, with_flush, for_loop_enabled, force, with_mmc));
+ DEBUG_TRACE (DEBUG::Transport, string_compose ("rt-locate to %1, roll %2 flush %3 for loop end %4 force %5 mmc %6\n",
+ target_sample, with_roll, with_flush, for_loop_end, force, with_mmc));
- if (!force && _transport_sample == target_sample && !loop_changing && !for_loop_enabled) {
+ if (!force && _transport_sample == target_sample && !loop_changing && !for_loop_end) {
/* already at the desired position. Not forced to locate,
the loop isn't changing, so unless we're told to
@@ -286,7 +286,7 @@ Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush,
}
}
- if (force || !for_loop_enabled || loop_changing) {
+ if (force || !for_loop_end || loop_changing) {
PostTransportWork todo = PostTransportLocate;
@@ -384,7 +384,13 @@ Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush,
if (need_butler) {
TFSM_EVENT (TransportFSM::ButlerRequired);
} else {
- TFSM_EVENT (TransportFSM::LocateDone);
+ 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);
+ }
}
loop_changing = false;