cleanup confused mess related to jack_port_type_get_buffer_size()
[ardour.git] / libs / ardour / session_export.cc
index 17387ebd5e682e086c1d6bd8eef68f158aad7a5d..dffe6582f2c4becb17590666e7a1be8e517ea45d 100644 (file)
@@ -28,6 +28,7 @@
 #include "ardour/export_status.h"
 #include "ardour/session.h"
 #include "ardour/track.h"
+#include "ardour/process_thread.h"
 
 #include "i18n.h"
 
@@ -95,7 +96,7 @@ Session::pre_export ()
 }
 
 int
-Session::start_audio_export (nframes_t position, bool /* realtime */)
+Session::start_audio_export (framepos_t position, bool /* realtime */)
 {
        if (!_exporting) {
                pre_export ();
@@ -148,7 +149,7 @@ Session::start_audio_export (nframes_t position, bool /* realtime */)
 }
 
 void
-Session::process_export (nframes_t nframes)
+Session::process_export (pframes_t nframes)
 {
        if (_export_rolling && export_status->stop) {
                stop_audio_export ();
@@ -164,7 +165,7 @@ Session::process_export (nframes_t nframes)
 
                process_without_events (nframes);
        }
-       
+
        try {
                /* handle export - XXX what about error handling? */
 
@@ -177,9 +178,11 @@ Session::process_export (nframes_t nframes)
 }
 
 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;
 }
 
@@ -221,6 +224,6 @@ Session::finalize_audio_export ()
        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);
        }
 }