Permalink
Browse files

AUDIO: Support Wave files with an initial fact chunk

  • Loading branch information...
1 parent 8f6f342 commit 7b10dac54214e2721250db9ba4bb1ffb1ad14587 @dreammaster dreammaster committed Dec 21, 2016
Showing with 7 additions and 0 deletions.
  1. +7 −0 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;

0 comments on commit 7b10dac

Please sign in to comment.