summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-01-23 14:25:01 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2020-01-23 14:25:38 -0700
commit7da3305a04ce57b318a99bb966710d3a156c0061 (patch)
tree255f3e38f3f56dd5abb67888b92631d16e7d4f0d /libs
parent5949fec9879967ee555a38c205227019c3134c66 (diff)
use Session::locate_initiated(), appropriately
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/butler.cc12
-rw-r--r--libs/ardour/session_transport.cc8
2 files changed, 16 insertions, 4 deletions
diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc
index c28d630fff..b4bf5a83be 100644
--- a/libs/ardour/butler.cc
+++ b/libs/ardour/butler.cc
@@ -204,6 +204,18 @@ Butler::thread_work ()
DEBUG_TRACE (DEBUG::Butler, string_compose ("do transport work @ %1\n", g_get_monotonic_time()));
_session.butler_transport_work ();
DEBUG_TRACE (DEBUG::Butler, string_compose ("\ttransport work complete @ %1, twr = %2\n", g_get_monotonic_time(), transport_work_requested()));
+
+ if (_session.locate_initiated()) {
+ /* we have done the "stop" required for a
+ locate (DeclickToLocate state in TFSM), but
+ once that finishes we're going to do a locate,
+ so do not bother with buffer refills at this
+ time.
+ */
+ DEBUG_TRACE (DEBUG::Butler, string_compose ("\tlocate pending, so just pause @ %1 till woken again\n", g_get_monotonic_time()));
+ paused.signal ();
+ continue;
+ }
}
sampleoffset_t audition_seek;
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index d930b140b0..b8ff0a7e04 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -1439,7 +1439,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
* location, or just back to the start of the last roll.
*/
- if (transport_master_no_external_or_using_engine() && !(ptw & PostTransportLocate)) {
+ if (transport_master_no_external_or_using_engine() && !locate_initiated()) {
bool do_locate = false;
@@ -1517,8 +1517,10 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
}
}
- {
+ if (!_transport_fsm->declicking_for_locate()) {
+
DEBUG_TRACE (DEBUG::Transport, X_("Butler PTW: locate\n"));
+
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
DEBUG_TRACE (DEBUG::Transport, string_compose ("Butler PTW: locate on %1\n", (*i)->name()));
(*i)->non_realtime_locate (_transport_sample);
@@ -1529,9 +1531,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
return;
}
}
- }
- {
VCAList v = _vca_manager->vcas ();
for (VCAList::const_iterator i = v.begin(); i != v.end(); ++i) {
(*i)->non_realtime_locate (_transport_sample);