summaryrefslogtreecommitdiff
path: root/libs/ardour/session_transport.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-09-22 12:18:36 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-09-22 12:23:54 -0600
commit21ba7fb8441caef38c15f5129c3704346e4b5b2e (patch)
tree7e7a7375933e0f48b6828f4da5426959c166f751 /libs/ardour/session_transport.cc
parent2a221ae21bd60d8576a84bc4c8a5ce04c679ef21 (diff)
change the way we clear post transport work as the butler and post-butler methods get things done
This avoids the blanket "set_post_transport_work (PostTransportWork(0));" that never really looked right
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r--libs/ardour/session_transport.cc29
1 files changed, 12 insertions, 17 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 5e250e064d..f2766f2c7e 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -746,23 +746,28 @@ Session::butler_completed_transport_work ()
} else {
process_function = &Session::process_with_events;
}
+ ptw = PostTransportWork (ptw & ~PostTransportAudition);
+ set_post_transport_work (ptw);
}
if (ptw & PostTransportLocate) {
post_locate ();
+ ptw = PostTransportWork (ptw & ~PostTransportLocate);
+ set_post_transport_work (ptw);
TFSM_EVENT (TransportFSM::LocateDone);
}
if (ptw & PostTransportAdjustPlaybackBuffering) {
/* we blocked output while this happened */
DiskReader::dec_no_disk_output ();
+ ptw = PostTransportWork (ptw & ~PostTransportAdjustPlaybackBuffering);
+ set_post_transport_work (ptw);
}
+ ptw = PostTransportWork (ptw & ~(PostTransportAdjustCaptureBuffering|PostTransportOverWrite));
+ set_post_transport_work (ptw);
+
set_next_event ();
- /* XXX is this really safe? shouldn't we just be unsetting the bits that we actually
- know were handled ?
- */
- set_post_transport_work (PostTransportWork (0));
if (_transport_fsm->waiting_for_butler()) {
TFSM_EVENT (TransportFSM::ButlerDone);
@@ -1676,7 +1681,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
/* do this before seeking, because otherwise the tracks will do the wrong thing in seamless loop mode.
*/
- if (ptw & PostTransportClearSubstate) {
+ if (ptw & (PostTransportClearSubstate|PostTransportStop)) {
unset_play_range ();
if (!Config->get_loop_is_mode()) {
unset_play_loop ();
@@ -1750,23 +1755,13 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
SaveSessionRequested (_current_snapshot_name);
}
- if (ptw & PostTransportStop) {
- unset_play_range ();
- if (!Config->get_loop_is_mode()) {
- unset_play_loop ();
- }
- }
-
PositionChanged (_transport_sample); /* EMIT SIGNAL */
DEBUG_TRACE (DEBUG::Transport, string_compose ("send TSC with speed = %1\n", _transport_speed));
TransportStateChange (); /* EMIT SIGNAL */
AutomationWatch::instance().transport_stop_automation_watches (_transport_sample);
- /* and start it up again if relevant */
-
- if ((ptw & PostTransportLocate) && !config.get_external_sync()) {
- request_transport_speed (1.0);
- }
+ ptw = PostTransportWork (ptw & ~(PostTransportStop|PostTransportClearSubstate));
+ set_post_transport_work (ptw);
}
void