resolve gtk + VST threading issues
[ardour.git] / libs / ardour / session_export.cc
index d1ee5d8122662a8eff6c6e3f0f23d1ce49caf246..62eb61ab83e16654eb13890d2cddbcbe9e5feb50 100644 (file)
@@ -21,7 +21,6 @@
 #include "pbd/error.h"
 #include <glibmm/threads.h>
 
-#include <midi++/manager.h>
 #include <midi++/mmc.h>
 
 #include "ardour/audioengine.h"
@@ -93,8 +92,8 @@ Session::pre_export ()
        
        /* disable MMC output early */
 
-       _pre_export_mmc_enabled = MIDI::Manager::instance()->mmc()->send_enabled ();
-       MIDI::Manager::instance()->mmc()->enable_send (false);
+       _pre_export_mmc_enabled = _mmc->send_enabled ();
+       _mmc->enable_send (false);
 
        return 0;
 }
@@ -105,8 +104,8 @@ Session::start_audio_export (framepos_t position)
 {
        if (!_exporting) {
                pre_export ();
-               _export_started = false;
        }
+       _export_started = false;
 
        /* 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
@@ -237,7 +236,7 @@ Session::finalize_audio_export ()
 
        export_freewheel_connection.disconnect();
        
-       MIDI::Manager::instance()->mmc()->enable_send (_pre_export_mmc_enabled);
+       _mmc->enable_send (_pre_export_mmc_enabled);
 
        /* maybe write CUE/TOC */