diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index d90c9cfb46..028c56685a 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -32,6 +32,7 @@ #include "ardour/audiofile_tagger.h" #include "ardour/audio_port.h" #include "ardour/debug.h" +#include "ardour/disk_reader.h" #include "ardour/export_graph_builder.h" #include "ardour/export_handler.h" #include "ardour/export_timespan.h" @@ -380,7 +381,10 @@ ExportHandler::start_timespan_bg (void* eh) ExportHandler* self = static_cast (eh); self->process_connection.disconnect (); Glib::Threads::Mutex::Lock l (self->export_status->lock()); + SessionEvent::create_per_thread_pool (name, 512); + DiskReader::allocate_working_buffers (); self->start_timespan (); + DiskReader::free_working_buffers (); return 0; } diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc index 2310a83002..0e2168c69c 100644 --- a/libs/ardour/session_export.cc +++ b/libs/ardour/session_export.cc @@ -173,6 +173,8 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex /* get everyone to the right position */ std::shared_ptr rl = routes.reader(); + ARDOUR::ProcessThread* pt = new ProcessThread (); + pt->get_buffers (); for (auto const& i : *rl) { std::shared_ptr tr = std::dynamic_pointer_cast (i); @@ -182,6 +184,8 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex return -1; } } + pt->drop_buffers (); + delete pt; } /* we just did the core part of a locate call above, but