#include "pbd/error.h"
#include <glibmm/thread.h>
-#include "ardour/audio_diskstream.h"
#include "ardour/audioengine.h"
#include "ardour/butler.h"
#include "ardour/export_failed.h"
#include "ardour/export_handler.h"
#include "ardour/export_status.h"
-#include "ardour/route.h"
#include "ardour/session.h"
+#include "ardour/track.h"
+#include "ardour/process_thread.h"
#include "i18n.h"
}
int
-Session::start_audio_export (nframes_t position, bool /* realtime */)
+Session::start_audio_export (framepos_t position, bool /* realtime */)
{
if (!_exporting) {
pre_export ();
/* get everyone to the right position */
{
- boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+ boost::shared_ptr<RouteList> rl = routes.reader();
- for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
- if ((*i)-> seek (position, true)) {
+ for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
+ boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
+ if (tr && tr->seek (position, true)) {
error << string_compose (_("%1: cannot seek to %2 for export"),
(*i)->name(), position)
<< endmsg;
}
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? */
}
int
-Session::process_export_fw (nframes_t nframes)
+Session::process_export_fw (pframes_t nframes)
{
+ _engine.main_thread()->get_buffers ();
process_export (nframes);
+ _engine.main_thread()->drop_buffers ();
return 0;
}
if (post_export_sync) {
config.set_external_sync (true);
} else {
- locate (post_export_position, false, false, false);
+ locate (post_export_position, false, false, false, false, false);
}
}