shithub: sox

Download patch

ref: dfe7ff454e0d9f28c28a0b2d7550c23c12c3b8e4
parent: 543588d355ac930d249694efb6bdabaa789f4b50
author: robs <robs>
date: Sun Jun 10 14:52:48 EDT 2007

Sounds like people over at sox-users don't want to lose the signal-size letters just yet.

--- a/src/sox.c
+++ b/src/sox.c
@@ -670,7 +670,7 @@
   return result;
 }
 
-static char *getoptstr = "+ac:efghimnoqr:st:uv:xABC:DLMNRSUV::X12348";
+static char *getoptstr = "+abc:defghilmnoqr:st:uv:wxABC:DLMNRSUV::X12348";
 
 static struct option long_options[] =
   {
@@ -869,11 +869,11 @@
       }
       break;
 
-    case '1': f->signal.size = SOX_SIZE_BYTE;  break;
-    case '2': f->signal.size = SOX_SIZE_16BIT; break;
-    case '3': f->signal.size = SOX_SIZE_24BIT; break;
-    case '4': f->signal.size = SOX_SIZE_32BIT; break;
-    case '8': f->signal.size = SOX_SIZE_64BIT; break;
+    case '1': case 'b': f->signal.size = SOX_SIZE_BYTE;  break;
+    case '2': case 'w': f->signal.size = SOX_SIZE_16BIT; break;
+    case '3':           f->signal.size = SOX_SIZE_24BIT; break;
+    case '4': case 'l': f->signal.size = SOX_SIZE_32BIT; break;
+    case '8': case 'd': f->signal.size = SOX_SIZE_64BIT; break;
 
     case 's': f->signal.encoding = SOX_ENCODING_SIGN2;     break;
     case 'u': f->signal.encoding = SOX_ENCODING_UNSIGNED;  break;