add portengine set-property API (follows jack_set_property)
[ardour.git] / session_utils / export.cc
index e7d169a0d3f1366f76372f8fc160cbc09b0b19b4..13f78986aa3334e9dd7c719358979545ea5e9571 100644 (file)
@@ -120,13 +120,20 @@ static int export_session (Session *session,
 
        // TODO trap SIGINT -> status->abort();
 
-       while (status->running) {
-               if (status->normalizing) {
-                       double progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
+       while (status->running ()) {
+               double progress = 0.0;
+               switch (status->active_job) {
+               case ExportStatus::Normalizing:
+                       progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
                        printf ("* Normalizing %.1f%%      \r", 100. * progress); fflush (stdout);
-               } else {
-                       double progress = ((float) status->processed_frames_current_timespan) / status->total_frames_current_timespan;
+                       break;
+               case ExportStatus::Exporting:
+                       progress = ((float) status->processed_frames_current_timespan) / status->total_frames_current_timespan;
                        printf ("* Exporting Audio %.1f%%  \r", 100. * progress); fflush (stdout);
+                       break;
+               default:
+                       printf ("* Exporting...            \r");
+                       break;
                }
                Glib::usleep (1000000);
        }