aboutsummaryrefslogtreecommitdiff
path: root/graphics/video
diff options
context:
space:
mode:
authorMatthew Hoops2010-05-31 01:27:57 +0000
committerMatthew Hoops2010-05-31 01:27:57 +0000
commit2a0f91444f3d42068a7aa6e1b6a6ac57ce0a0574 (patch)
tree5e8dcb0f2fd2129d617d88fb26f2b543acc98be8 /graphics/video
parent693618d89a56ccc943f9f0608abf8737d5002d32 (diff)
downloadscummvm-rg350-2a0f91444f3d42068a7aa6e1b6a6ac57ce0a0574.tar.gz
scummvm-rg350-2a0f91444f3d42068a7aa6e1b6a6ac57ce0a0574.tar.bz2
scummvm-rg350-2a0f91444f3d42068a7aa6e1b6a6ac57ce0a0574.zip
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).
svn-id: r49340
Diffstat (limited to 'graphics/video')
-rw-r--r--graphics/video/smk_decoder.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/graphics/video/smk_decoder.cpp b/graphics/video/smk_decoder.cpp
index f27a70f78c..adc96a7820 100644
--- a/graphics/video/smk_decoder.cpp
+++ b/graphics/video/smk_decoder.cpp
@@ -361,7 +361,7 @@ SmackerDecoder::~SmackerDecoder() {
}
uint32 SmackerDecoder::getElapsedTime() const {
- if (_audioStream)
+ if (_audioStream && _audioStarted)
return _mixer->getSoundElapsedTime(_audioHandle);
return VideoDecoder::getElapsedTime();
@@ -438,6 +438,9 @@ bool SmackerDecoder::load(Common::SeekableReadStream &stream) {
!(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 @@ Surface *SmackerDecoder::decodeNextFrame() {
_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);