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
This commit is contained in:
terminx 2018-04-21 06:04:44 +00:00
parent f952a77c9e
commit b92d4f6c1b

View file

@ -117,26 +117,19 @@ 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;
}
return fmt;
}