[Scummvm-git-logs] scummvm master -> 3a60637d77f620b94ae65fe137f99e6881075df2
sev-
sev at scummvm.org
Wed Jan 31 16:36:29 CET 2018
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:
3a60637d77 SCUMM: really implement lipsync
Commit: 3a60637d77f620b94ae65fe137f99e6881075df2
https://github.com/scummvm/scummvm/commit/3a60637d77f620b94ae65fe137f99e6881075df2
Author: Giovanni Bajo (rasky at develer.com)
Date: 2018-01-31T16:36:24+01:00
Commit Message:
SCUMM: really implement lipsync
It looks like the code was there, but it was never fully implemented
because _curSoundPos was never being incremented. Experimentally,
it looks like it works if it is a 60FPS counter.
Changed paths:
engines/scumm/sound.cpp
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 98958a3..318a0b8 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -448,14 +448,15 @@ void Sound::processSfxQueues() {
finished = !isSoundRunning(1);
} else {
finished = !_mixer->isSoundHandleActive(*_talkChannelHandle);
+ // calculate speech sound position simulating increment at 60FPS
+ _curSoundPos = (_mixer->getSoundElapsedTime(*_talkChannelHandle) * 60) / 1000;
}
if ((uint) act < 0x80 && ((_vm->_game.version == 8) || (_vm->_game.version <= 7 && !_vm->_string[0].no_talk_anim))) {
a = _vm->derefActor(act, "processSfxQueues");
if (a->isInCurrentRoom()) {
- if (isMouthSyncOff(_curSoundPos) && !_mouthSyncMode) {
- if (!_endOfMouthSync)
- a->runActorTalkScript(a->_talkStopFrame);
+ if (isMouthSyncOff(_curSoundPos) && _mouthSyncMode) {
+ a->runActorTalkScript(a->_talkStopFrame);
_mouthSyncMode = 0;
} else if (isMouthSyncOff(_curSoundPos) == 0 && !_mouthSyncMode) {
a->runActorTalkScript(a->_talkStartFrame);
More information about the Scummvm-git-logs
mailing list