diff decoders/wav.c @ 193:6cd07211a235

Added some debugging output in preparation for future codecs (gsm, maybe?)
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 02 Jan 2002 01:09:02 +0000
parents 6bb68b3bdcf1
children c9772a9f5271
line wrap: on
line diff
--- a/decoders/wav.c	Wed Jan 02 00:41:03 2002 +0000
+++ b/decoders/wav.c	Wed Jan 02 01:09:02 2002 +0000
@@ -556,7 +556,7 @@
         /* add other types here. */
 
         default:
-            SNDDBG(("WAV: Format %lu is unknown.\n",
+            SNDDBG(("WAV: Format 0x%X is unknown.\n",
                     (unsigned int) fmt->wFormatTag));
             Sound_SetError("WAV: Unsupported format");
             return(0);  /* not supported whatsoever. */
@@ -610,14 +610,17 @@
 
     sample->actual.channels = (Uint8) fmt->wChannels;
     sample->actual.rate = fmt->dwSamplesPerSec;
-    if (fmt->wBitsPerSample == 4)
+    if ((fmt->wBitsPerSample == 4) /*|| (fmt->wBitsPerSample == 0) */ )
         sample->actual.format = AUDIO_S16SYS;  /* !!! FIXME ? */
     else if (fmt->wBitsPerSample == 8)
         sample->actual.format = AUDIO_U8;
     else if (fmt->wBitsPerSample == 16)
         sample->actual.format = AUDIO_S16LSB;
     else
+    {
+        SNDDBG(("WAV: %d bits per sample!?\n", (int) fmt->wBitsPerSample));
         BAIL_MACRO("WAV: Unsupported sample size.", 0);
+    } /* else */
 
     BAIL_IF_MACRO(!read_fmt(rw, fmt), NULL, 0);
     BAIL_IF_MACRO(!find_chunk(rw, dataID), "WAV: No data chunk.", 0);