aboutsummaryrefslogtreecommitdiff
path: root/audio/decoders/wave.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-12-20 22:47:49 -0500
committerPaul Gilbert2016-12-20 22:47:49 -0500
commit7b10dac54214e2721250db9ba4bb1ffb1ad14587 (patch)
tree0be845a6f44a14d785d43d02028d1bdb9ee61080 /audio/decoders/wave.cpp
parent8f6f342c3f05375e8a0cd0902bf3373614dacfa0 (diff)
downloadscummvm-rg350-7b10dac54214e2721250db9ba4bb1ffb1ad14587.tar.gz
scummvm-rg350-7b10dac54214e2721250db9ba4bb1ffb1ad14587.tar.bz2
scummvm-rg350-7b10dac54214e2721250db9ba4bb1ffb1ad14587.zip
AUDIO: Support Wave files with an initial fact chunk
Diffstat (limited to 'audio/decoders/wave.cpp')
-rw-r--r--audio/decoders/wave.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/decoders/wave.cpp b/audio/decoders/wave.cpp
index 803bdf3cf0..55c7034df6 100644
--- a/audio/decoders/wave.cpp
+++ b/audio/decoders/wave.cpp
@@ -61,6 +61,13 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
}
stream.read(buf, 4);
+ if (memcmp(buf, "fact", 4) == 0) {
+ // Initial fact chunk, so skip over it
+ uint32 factLen = stream.readUint32LE();
+ stream.skip(factLen);
+ stream.read(buf, 4);
+ }
+
if (memcmp(buf, "fmt ", 4) != 0) {
warning("getWavInfo: No 'fmt' header");
return false;