{
get_export_status (); // Init export_status
- _butler->wait_until_finished ();
-
/* take everyone out of awrite to avoid disasters */
{
return 0;
}
+/** Called for each range that is being exported */
int
-Session::start_audio_export (nframes_t position, bool /* realtime */)
+Session::start_audio_export (framepos_t position, bool /* realtime */)
{
if (!_exporting) {
pre_export ();
}
+ /* We're about to call Track::seek, so the butler must have finished everything
+ up otherwise it could be doing do_refill in its thread while we are doing
+ it here.
+ */
+
+ _butler->wait_until_finished ();
+
/* get everyone to the right position */
{
}
void
-Session::process_export (nframes_t nframes)
+Session::process_export (pframes_t nframes)
{
if (_export_rolling && export_status->stop) {
stop_audio_export ();
process_without_events (nframes);
}
-
+
try {
/* handle export - XXX what about error handling? */
ProcessExport (nframes);
} catch (std::exception & e) {
- std::cout << e.what() << std::endl;
+ error << string_compose (_("Export ended unexpectedly: %1"), e.what()) << endmsg;
export_status->abort (true);
}
}
int
-Session::process_export_fw (nframes_t nframes)
+Session::process_export_fw (pframes_t nframes)
{
_engine.main_thread()->get_buffers ();
process_export (nframes);
_engine.freewheel (false);
export_freewheel_connection.disconnect();
+
+ /* maybe write CUE/TOC */
+
export_handler.reset();
export_status.reset();