diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/session.h | 1 | ||||
-rw-r--r-- | libs/ardour/session_export.cc | 16 |
2 files changed, 12 insertions, 5 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 5e1245294b..df04971e02 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -964,6 +964,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi framepos_t post_export_position; bool _exporting; + bool _export_started; bool _export_rolling; boost::shared_ptr<ExportHandler> export_handler; diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 1c1b4f9a0f..969f4bb609 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -106,6 +106,7 @@ Session::start_audio_export (framepos_t position) { if (!_exporting) { pre_export (); + _export_started = false; } /* We're about to call Track::seek, so the butler must have finished everything @@ -145,11 +146,6 @@ Session::start_audio_export (framepos_t position) since then has re-awakened it. */ - set_transport_speed (1.0, false); - butler_transport_work (); - g_atomic_int_set (&_butler->should_do_transport_work, 0); - post_transport (); - /* we are ready to go ... */ if (!_engine.connected()) { @@ -193,6 +189,16 @@ Session::process_export (pframes_t nframes) int Session::process_export_fw (pframes_t nframes) { + + if (!_export_started) { + _export_started=true; + set_transport_speed (1.0, false); + butler_transport_work (); + g_atomic_int_set (&_butler->should_do_transport_work, 0); + post_transport (); + return 0; + } + _engine.main_thread()->get_buffers (); process_export (nframes); _engine.main_thread()->drop_buffers (); |