diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-09-17 18:26:03 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-09-17 18:26:03 -0600 |
commit | bd229936ec2cb30fe3360f2d83ffc7197fd6fb97 (patch) | |
tree | 84e41e048d76541d5d491ccefe8c7feaa14f4d5c /libs/ardour/session_export.cc | |
parent | fc3e7623e7a4c7fdeebf84c4d47eaf04d9bc744d (diff) |
add finite state machine to control/manage transport state
Diffstat (limited to 'libs/ardour/session_export.cc')
-rw-r--r-- | libs/ardour/session_export.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 8d7b4da6c5..c1a7f5f388 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -95,7 +95,7 @@ Session::pre_export () _exporting = true; export_status->set_running (true); - export_status->Finished.connect_same_thread (*this, boost::bind (&Session::finalize_audio_export, this)); + export_status->Finished.connect_same_thread (*this, boost::bind (&Session::finalize_audio_export, this, _1)); /* disable MMC output early */ @@ -153,7 +153,7 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex } } - /* we just did the core part of a locate() call above, but + /* we just did the core part of a locate call above, but for the sake of any GUI, put the _transport_sample in the right place too. */ @@ -256,7 +256,7 @@ Session::process_export_fw (pframes_t nframes) set_transport_speed (1.0, 0, false); butler_transport_work (); g_atomic_int_set (&_butler->should_do_transport_work, 0); - post_transport (); + butler_completed_transport_work (); return; } @@ -299,7 +299,7 @@ int Session::stop_audio_export () { /* can't use stop_transport() here because we need - an immediate halt and don't require all the declick + an synchronous halt and don't require all the declick stuff that stop_transport() implements. */ @@ -311,8 +311,14 @@ Session::stop_audio_export () } void -Session::finalize_audio_export () +Session::finalize_audio_export (TransportRequestSource trs) { + /* This is called as a handler for the Finished signal, which is + emitted by a UI component once the ExportStatus object associated + with this export indicates that it has finished. It runs in the UI + thread that emits the signal. + */ + _exporting = false; if (_export_rolling) { @@ -340,6 +346,6 @@ Session::finalize_audio_export () if (post_export_sync) { config.set_external_sync (true); } else { - locate (post_export_position, false, false, false, false, false); + request_locate (post_export_position, false, trs); } } |