shithub: sox

Download patch

ref: 8b4468fddf4747419636999eb52bd5be97e0a21c
parent: 56f4404f4adda37780748c989ce271ffccd78086
author: robs <robs>
date: Sun Jun 17 17:15:09 EDT 2007

Keep old raw file extensions working for now

--- a/src/raw.h
+++ b/src/raw.h
@@ -28,6 +28,14 @@
   static char const *names[] = {#id, NULL}; \
   RAW_FORMAT0(id, size, flags, encoding)
 
+#define RAW_FORMAT1(id, alt, size, flags, encoding) \
+  static char const *names[] = {#id, alt, NULL}; \
+  RAW_FORMAT0(id, size, flags, encoding)
+
 #define RAW_FORMAT2(id, alt1, alt2, size, flags, encoding) \
   static char const *names[] = {#id, alt1, alt2, NULL}; \
+  RAW_FORMAT0(id, size, flags, encoding)
+
+#define RAW_FORMAT3(id, alt1, alt2, alt3, size, flags, encoding) \
+  static char const *names[] = {#id, alt1, alt2, alt3, NULL}; \
   RAW_FORMAT0(id, size, flags, encoding)
--- a/src/s1-fmt.c
+++ b/src/s1-fmt.c
@@ -11,4 +11,4 @@
 #include "sox_i.h"
 #include "raw.h"
 
-RAW_FORMAT(s1, 8BIT, 0, SIGN2)
+RAW_FORMAT1(s1, "sb", 8BIT, 0, SIGN2)
--- a/src/s2-fmt.c
+++ b/src/s2-fmt.c
@@ -11,4 +11,4 @@
 #include "sox_i.h"
 #include "raw.h"
 
-RAW_FORMAT(s2, 16BIT, 0, SIGN2)
+RAW_FORMAT1(s2, "sw", 16BIT, 0, SIGN2)
--- a/src/s4-fmt.c
+++ b/src/s4-fmt.c
@@ -11,4 +11,4 @@
 #include "sox_i.h"
 #include "raw.h"
 
-RAW_FORMAT(s4, 32BIT, 0, SIGN2)
+RAW_FORMAT1(s4, "sl", 32BIT, 0, SIGN2)
--- a/src/u1-fmt.c
+++ b/src/u1-fmt.c
@@ -11,4 +11,4 @@
 #include "sox_i.h"
 #include "raw.h"
 
-RAW_FORMAT2(u1, "sou", "fssd", 8BIT, 0, UNSIGNED)
+RAW_FORMAT3(u1, "ub", "sou", "fssd", 8BIT, 0, UNSIGNED)
--- a/src/u2-fmt.c
+++ b/src/u2-fmt.c
@@ -11,4 +11,4 @@
 #include "sox_i.h"
 #include "raw.h"
 
-RAW_FORMAT(u2, 16BIT, 0, UNSIGNED)
+RAW_FORMAT1(u2, "uw", 16BIT, 0, UNSIGNED)