[xiph-commits] r18225 - trunk/spectrum
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Wed Apr 11 13:22:21 PDT 2012
Author: xiphmont
Date: 2012-04-11 13:22:21 -0700 (Wed, 11 Apr 2012)
New Revision: 18225
Modified:
trunk/spectrum/process.c
Log:
Add cooked WAVE_FORMAT_EXTENSIBLE support
Modified: trunk/spectrum/process.c
===================================================================
--- trunk/spectrum/process.c 2012-04-10 18:14:23 UTC (rev 18224)
+++ trunk/spectrum/process.c 2012-04-11 20:22:21 UTC (rev 18225)
@@ -210,10 +210,17 @@
lch = READ_U16_LE(buf+2);
lrate = READ_U32_LE(buf+4);
lbits = READ_U16_LE(buf+14);
-
+
+ /* Add cooked WAVE_FORMAT_EXTENSIBLE support */
+ if(ltype == 65534){
+ int cbSize = READ_U16_LE(buf+16);
+ if(cbSize>=22)
+ ltype = READ_U16_LE(buf + 24);
+ }
+
if(ltype!=1){
- fprintf(stderr,"%s:\n\tWAVE file not PCM.\n",inputname[fi]);
- return 1;
+ fprintf(stderr,"%s:\n\tWAVE file not PCM.\n",inputname[fi]);
+ return 1;
}
if(bits[fi]==-1)bits[fi]=lbits;
More information about the commits
mailing list