shithub: sox

Download patch

ref: fbbc16d6de5a374253ea07b751c2e0d1c09befd5
parent: ed4e4fc7c94d10be9c855d7e54ea63cb0b482828
author: Ulrich Klauer <ulrich@chirlu.de>
date: Wed Jan 30 17:44:43 EST 2013

Replace removed options in stat output

The stat effect sometimes outputs a guess about the file encoding.
Replace removed options -s, -u, -U and -1 there.

--- a/src/stat.c
+++ b/src/stat.c
@@ -296,16 +296,16 @@
 
     if (x >= 3.0) {             /* use opposite encoding */
       if (effp->in_encoding->encoding == SOX_ENCODING_UNSIGNED)
-        fprintf(stderr,"\nTry: -t raw -s -1 \n");
+        fprintf(stderr,"\nTry: -t raw -e signed-integer -b 8 \n");
       else
-        fprintf(stderr,"\nTry: -t raw -u -1 \n");
+        fprintf(stderr,"\nTry: -t raw -e unsigned-integer -b 8 \n");
     } else if (x <= 1.0 / 3.0)
       ;                         /* correctly decoded */
     else if (x >= 0.5 && x <= 2.0) { /* use ULAW */
       if (effp->in_encoding->encoding == SOX_ENCODING_ULAW)
-        fprintf(stderr,"\nTry: -t raw -u -1 \n");
+        fprintf(stderr,"\nTry: -t raw -e unsigned-integer -b 8 \n");
       else
-        fprintf(stderr,"\nTry: -t raw -U -1 \n");
+        fprintf(stderr,"\nTry: -t raw -e mu-law -b 8 \n");
     } else
       fprintf(stderr, "\nCan't guess the type\n");
   }