[Scummvm-cvs-logs] scummvm master -> 4e1ffc9434f771d3f43e66104adeea9e0166123c
eriktorbjorn
eriktorbjorn at telia.com
Sat Jan 24 15:00:09 CET 2015
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ca83ecd8c2 ZVISION: Fix lag at beginning of cutscenes
4e1ffc9434 ZVISION: Delete stream if there is no audio stream to queue to
Commit: ca83ecd8c22c132da3f9b8963ffb76702692a272
https://github.com/scummvm/scummvm/commit/ca83ecd8c22c132da3f9b8963ffb76702692a272
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-01-24T14:57:47+01:00
Commit Message:
ZVISION: Fix lag at beginning of cutscenes
We have to update _curChunk when decoding audio, otherwise it will
decode the entire audio track on the first frame. For the ZGI intro
this would take 700-800 ms, and since the audio started playing
before the video it looked to me as if it had to play the first bit
faster to catch up.
Thanks to fuzzie for setting me on the right track with an off-hand
remark about the Zork AVI decoder (I was looking at the standard
AVI decoder), and for finding the cause a few seconds before I did.
Changed paths:
engines/zvision/video/zork_avi_decoder.cpp
diff --git a/engines/zvision/video/zork_avi_decoder.cpp b/engines/zvision/video/zork_avi_decoder.cpp
index 5618250..abf4854 100644
--- a/engines/zvision/video/zork_avi_decoder.cpp
+++ b/engines/zvision/video/zork_avi_decoder.cpp
@@ -39,6 +39,7 @@ Video::AVIDecoder::AVIAudioTrack *ZorkAVIDecoder::createAudioTrack(Video::AVIDec
}
void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *stream) {
+ bool updateCurChunk = true;
if (_audStream) {
if (_wvInfo.tag == kWaveFormatZorkPCM) {
assert(_wvInfo.size == 8);
@@ -54,9 +55,17 @@ void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *s
_audStream->queueBuffer((byte *)chunk.data, chunk.size, DisposeAfterUse::YES, flags);
}
} else {
+ updateCurChunk = false;
AVIAudioTrack::queueSound(stream);
}
}
+
+ // The superclass always updates _curChunk, whether or not audio has
+ // been queued, so we should do that too. Unless the superclass already
+ // has done it for us.
+ if (updateCurChunk) {
+ _curChunk++;
+ }
}
void ZorkAVIDecoder::ZorkAVIAudioTrack::resetStream() {
Commit: 4e1ffc9434f771d3f43e66104adeea9e0166123c
https://github.com/scummvm/scummvm/commit/4e1ffc9434f771d3f43e66104adeea9e0166123c
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-01-24T14:57:47+01:00
Commit Message:
ZVISION: Delete stream if there is no audio stream to queue to
This probably never happens, but is consistent with our common AVI
decoder.
Changed paths:
engines/zvision/video/zork_avi_decoder.cpp
diff --git a/engines/zvision/video/zork_avi_decoder.cpp b/engines/zvision/video/zork_avi_decoder.cpp
index abf4854..cf8505e 100644
--- a/engines/zvision/video/zork_avi_decoder.cpp
+++ b/engines/zvision/video/zork_avi_decoder.cpp
@@ -58,6 +58,8 @@ void ZorkAVIDecoder::ZorkAVIAudioTrack::queueSound(Common::SeekableReadStream *s
updateCurChunk = false;
AVIAudioTrack::queueSound(stream);
}
+ } else {
+ delete stream;
}
// The superclass always updates _curChunk, whether or not audio has
More information about the Scummvm-git-logs
mailing list