[Scummvm-git-logs] scummvm master -> 7b10dac54214e2721250db9ba4bb1ffb1ad14587

dreammaster dreammaster at scummvm.org
Wed Dec 21 04:47:55 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7b10dac542 AUDIO: Support Wave files with an initial fact chunk


Commit: 7b10dac54214e2721250db9ba4bb1ffb1ad14587
    https://github.com/scummvm/scummvm/commit/7b10dac54214e2721250db9ba4bb1ffb1ad14587
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-12-20T22:47:49-05:00

Commit Message:
AUDIO: Support Wave files with an initial fact chunk

Changed paths:
    audio/decoders/wave.cpp


diff --git a/audio/decoders/wave.cpp b/audio/decoders/wave.cpp
index 803bdf3..55c7034 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;





More information about the Scummvm-git-logs mailing list