X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=session_utils%2Fexport.cc;h=6ea7e2b5fdb3f0b92dc6b27d257c3897126abad9;hb=35a9facdaeed3285c0c81ba0b7b67d1607b56438;hp=e7d169a0d3f1366f76372f8fc160cbc09b0b19b4;hpb=b228c1131187f3822ece3bd6ed26869a68fb0dff;p=ardour.git diff --git a/session_utils/export.cc b/session_utils/export.cc index e7d169a0d3..6ea7e2b5fd 100644 --- a/session_utils/export.cc +++ b/session_utils/export.cc @@ -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_postprocessing_cycle) / status->total_postprocessing_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); } @@ -140,12 +147,12 @@ static int export_session (Session *session, static void usage (int status) { // help2man compatible format (standard GNU help-text) - printf ("export - export an ardour session from the commandline.\n\n"); - printf ("Usage: export [ OPTIONS ] \n\n"); + printf (UTILNAME " - export an ardour session from the commandline.\n\n"); + printf ("Usage: " UTILNAME " [ OPTIONS ] \n\n"); printf ("Options:\n\ -h, --help display this help and exit\n\ -n, --normalize normalize signal level (to 0dBFS)\n\ - -o, --output set expected [initial] framerate\n\ + -o, --output export output file name\n\ -s, --samplerate samplerate to use (default: 48000)\n\ -V, --version print version information and exit\n\ \n");