From b92d4f6c1b9cd548917fab85268d5806279a4fa8 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 21 Apr 2018 06:04:44 +0000 Subject: [PATCH] Slight change to FX_DetectFormat(); format specifications seem to say there's no such thing as WAVE without RIFF. git-svn-id: https://svn.eduke32.com/eduke32@6837 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/audiolib/src/fx_man.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/source/audiolib/src/fx_man.cpp b/source/audiolib/src/fx_man.cpp index 1c9fd2db1..f8055a29c 100644 --- a/source/audiolib/src/fx_man.cpp +++ b/source/audiolib/src/fx_man.cpp @@ -117,24 +117,17 @@ static wavefmt_t FX_DetectFormat(char const * const ptr, uint32_t length) case 'C' + ('D' << 8) + ('X' << 16) + ('A' << 24): // CDXA fmt = FMT_XA; break; - default: fmt = FMT_WAV; break; + case 'W' + ('A' << 8) + ('V' << 16) + ('E' << 24): // WAVE + fmt = FMT_WAV; + break; } break; case 'f' + ('L' << 8) + ('a' << 16) + ('C' << 24): // fLaC fmt = FMT_FLAC; break; default: - switch (B_LITTLE32(*(int32_t const *)(ptr + 8))) - { - case 'W' + ('A' << 8) + ('V' << 16) + ('E' << 24): // WAVE - fmt = FMT_WAV; - break; - } if (MV_IdentifyXMP(ptr, length)) - { fmt = FMT_XMP; - break; - } break; }