aboutsummaryrefslogtreecommitdiff
path: root/audio/decoders/wave.cpp
diff options
context:
space:
mode:
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;