[Scummvm-cvs-logs] SF.net SVN: scummvm:[49340] scummvm/trunk/graphics/video/smk_decoder.cpp

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Mon May 31 03:27:58 CEST 2010


Revision: 49340
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49340&view=rev
Author:   mthreepwood
Date:     2010-05-31 01:27:57 +0000 (Mon, 31 May 2010)

Log Message:
-----------
Ignore v2 compressed audio chunks instead of treating them as Huffman DPCM. Should fix playback of at least the video portion of those videos (found in later Broken Sword releases).

Modified Paths:
--------------
    scummvm/trunk/graphics/video/smk_decoder.cpp

Modified: scummvm/trunk/graphics/video/smk_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/smk_decoder.cpp	2010-05-31 00:04:38 UTC (rev 49339)
+++ scummvm/trunk/graphics/video/smk_decoder.cpp	2010-05-31 01:27:57 UTC (rev 49340)
@@ -361,7 +361,7 @@
 }
 
 uint32 SmackerDecoder::getElapsedTime() const {
-	if (_audioStream)
+	if (_audioStream && _audioStarted)
 		return _mixer->getSoundElapsedTime(_audioHandle);
 
 	return VideoDecoder::getElapsedTime();
@@ -438,6 +438,9 @@
 												!(audioInfo & 0x4000000);
 		_header.audioInfo[i].sampleRate = audioInfo & 0xFFFFFF;
 
+		if (_header.audioInfo[i].hasV2Compression)
+			warning("Unhandled Smacker v2 audio compression");
+
 		if (_header.audioInfo[i].hasAudio && i == 0)
 			_audioStream = Audio::makeQueuingAudioStream(_header.audioInfo[0].sampleRate, _header.audioInfo[0].isStereo);
 	}
@@ -541,7 +544,11 @@
 
 			_fileStream->read(soundBuffer, chunkSize);
 
-			if (_header.audioInfo[i].isCompressed) {
+			if (_header.audioInfo[i].hasV2Compression) {
+				// TODO: Compressed audio (Bink RDFT encoded)
+				free(soundBuffer);
+				continue;
+			} else if (_header.audioInfo[i].isCompressed) {
 				// Compressed audio (Huffman DPCM encoded)
 				queueCompressedBuffer(soundBuffer, chunkSize, dataSizeUnpacked, i);
 				free(soundBuffer);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list