use Session::locate_initiated(), appropriately

This commit is contained in:
Paul Davis 2020-01-23 14:25:01 -07:00
parent 5949fec987
commit 7da3305a04
2 changed files with 16 additions and 4 deletions

View File

@ -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;

View File

@ -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);