shithub: sox

Download patch

ref: 3a82bcd2c408e99a17b9bdba612a1ed337eb7fc4
parent: 3c7e5d1cdd4cc7ee54f3302ceed99f7fa7df7b38
author: robs <robs>
date: Tue Sep 25 14:58:54 EDT 2007

Support for non-standard 24-bit PCM

--- a/src/wav.c
+++ b/src/wav.c
@@ -1426,7 +1426,7 @@
     if (wFormatTag == WAVE_FORMAT_GSM610)
         dwDataLength = (dwDataLength+1) & ~1u; /*round up to even */
 
-    if ((wFormatTag == WAVE_FORMAT_PCM && wBitsPerSample > 16) || wChannels > 2)
+    if ((wFormatTag == WAVE_FORMAT_PCM && wBitsPerSample > 16 && strcmp(ft->filetype, "wavpcm")) || wChannels > 2)
     {
       isExtensible = sox_true;
       wFmtSize += 2 + 22;
@@ -1732,6 +1732,7 @@
 /* Microsoft RIFF */
 static const char *wavnames[] = {
   "wav",
+  "wavpcm",
   NULL
 };