*/
-#include <ardour/export_status.h>
+#include <pbd/stacktrace.h>
+
+#include "ardour/export_status.h"
namespace ARDOUR
{
void
ExportStatus::init ()
{
+ Glib::Threads::Mutex::Lock l (_run_lock);
stop = false;
- running = false;
+ _running = false;
_aborted = false;
-
- stage = export_None;
- progress = 0.0;
-
+ _errors = false;
+
+ active_job = Exporting;
+
total_timespans = 0;
timespan = 0;
-
- total_channel_configs = 0;
- channel_config = 0;
-
- total_formats = 0;
- format = 0;
+
+ total_frames = 0;
+ processed_frames = 0;
+
+ total_frames_current_timespan = 0;
+ processed_frames_current_timespan = 0;
+
+ total_normalize_cycles = 0;
+ current_normalize_cycle = 0;
+ result_map.clear();
+}
+
+void
+ExportStatus::abort (bool error_occurred)
+{
+ Glib::Threads::Mutex::Lock l (_run_lock);
+ _aborted = true;
+ _errors = _errors || error_occurred;
+ _running = false;
+}
+
+void
+ExportStatus::finish ()
+{
+ Glib::Threads::Mutex::Lock l (_run_lock);
+ set_running (false);
+ Finished(); /* EMIT SIGNAL */
}
} // namespace ARDOUR