fedora 24
obsolete weakness #286

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

Ardour-5.10.0/session_utils/export.cc

Context:

The highlighted line of code below is the trigger point of this particular Fedora 24 obsolete weakness.

 	/* do audio export */
	fmp->set_soundcloud_upload(false);
	session->get_export_handler()->add_export_config (tsp, ccp, fmp, fnp, b);
	session->get_export_handler()->do_export();

	boost::shared_ptr<ARDOUR::ExportStatus> status = session->get_export_status ();

	// TODO trap SIGINT -> status->abort();

	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);
			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);
	}
	printf("\n");

	status->finish ();

	printf ("* Done.\n");
	return 0;
}

static void usage (int status) {
	// help2man compatible format (standard GNU help-text)
	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>       export output file name\n\
  -s, --samplerate <rate>    samplerate to use (default: 48000)\n\
  -V, --version              print version information and exit\n\
\n");
	printf ("\n\
The session is exported as 16bit wav.\n\
If the no output file is given, the session's export dir is used.\n\
\n");
 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.