shithub: aubio

Download patch

ref: 4d733b53cd273831a5b1d3861f9ab5ff7d7227ea
parent: d626fac50971f6d8cac5097a1bb8b1cfd7c146b3
author: Paul Brossier <[email protected]>
date: Sat Dec 14 16:10:50 EST 2013

examples/utils.c: print error messages on stderr

--- a/examples/utils.c
+++ b/examples/utils.c
@@ -83,7 +83,7 @@
     debug ("Opening files ...\n");
     this_source = new_aubio_source ((char_t*)source_uri, samplerate, hop_size);
     if (this_source == NULL) {
-      outmsg ("Could not open input file %s\n", source_uri);
+      errmsg ("Error: could not open input file %s\n", source_uri);
       exit (1);
     }
     if (samplerate == 0) {
@@ -92,13 +92,13 @@
     if (sink_uri != NULL) {
       uint_t sink_exists = (access(sink_uri, F_OK) == 0 );
       if (!force_overwrite && sink_exists) {
-        outmsg ("Output file %s already exists, use -f to overwrite.\n",
+        errmsg ("Error: output file %s already exists, use -f to overwrite.\n",
             sink_uri);
         exit (1);
       }
       this_sink = new_aubio_sink ((char_t*)sink_uri, samplerate);
       if (this_sink == NULL) {
-        outmsg ("Could not open output file %s\n", sink_uri);
+        errmsg ("Error: could not create output file %s\n", sink_uri);
         exit (1);
       }
     }