# HG changeset patch # User Ryan C. Gordon # Date 1009933742 0 # Node ID 6cd07211a2352a3c43dc2e21d4050f4ed48d9332 # Parent 5b311ffabe4523702546c66238915ae1621cad89 Added some debugging output in preparation for future codecs (gsm, maybe?) diff -r 5b311ffabe45 -r 6cd07211a235 decoders/wav.c --- 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);