add API to Evoral::SMF to retrieve all track/instrument names for use when importing
[ardour.git] / libs / ardour / export_status.cc
index 70ce8dd27e96b286325d5bb3f77e0433403af032..808d6f144c59d2d1617aee02243b7ffec8962dff 100644 (file)
@@ -18,6 +18,8 @@
 
 */
 
+#include <pbd/stacktrace.h>
+
 #include "ardour/export_status.h"
 
 namespace ARDOUR
@@ -31,13 +33,13 @@ ExportStatus::ExportStatus ()
 void
 ExportStatus::init ()
 {
+       Glib::Threads::Mutex::Lock l (_run_lock);
        stop = false;
-       running = false;
+       _running = false;
        _aborted = false;
-       _finished = false;
        _errors = false;
 
-       normalizing = false;
+       active_job = Exporting;
 
        total_timespans = 0;
        timespan = 0;
@@ -48,26 +50,26 @@ ExportStatus::init ()
        total_frames_current_timespan = 0;
        processed_frames_current_timespan = 0;
 
-       total_normalize_cycles = 0;
-       current_normalize_cycle = 0;
+       total_postprocessing_cycles = 0;
+       current_postprocessing_cycle = 0;
+       result_map.clear();
 }
 
 void
 ExportStatus::abort (bool error_occurred)
 {
+       Glib::Threads::Mutex::Lock l (_run_lock);
        _aborted = true;
-       _finished = true;
        _errors = _errors || error_occurred;
-       running = false;
-       Aborting ();
+       _running = false;
 }
 
 void
 ExportStatus::finish ()
 {
-       _finished = true;
-       running = false;
-       Finished();
+       Glib::Threads::Mutex::Lock l (_run_lock);
+       set_running (false);
+       Finished(); /* EMIT SIGNAL */
 }
 
 } // namespace ARDOUR