// 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);
}
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 ] <session-dir> <session-name>\n\n");
+ printf (UTILNAME " - export an ardour session from the commandline.\n\n");
+ printf ("Usage: " UTILNAME " [ OPTIONS ] <session-dir> <session/snapshot-name>\n\n");
printf ("Options:\n\
-h, --help display this help and exit\n\
-n, --normalize normalize signal level (to 0dBFS)\n\
- -o, --output <file> set expected [initial] framerate\n\
+ -o, --output <file> export output file name\n\
-s, --samplerate <rate> samplerate to use (default: 48000)\n\
-V, --version print version information and exit\n\
\n");