diff options
author | Sven Hesse | 2008-12-12 14:28:06 +0000 |
---|---|---|
committer | Sven Hesse | 2008-12-12 14:28:06 +0000 |
commit | 63ddc1ba6fdfaa4ef9a60fe5a4457512bbe3371f (patch) | |
tree | 8898fe74e357d79f101be0b8dcba62772c52336f /engines/gob/coktelvideo.cpp | |
parent | cfa939d1510d0630a81cec41fc94a61b9908693e (diff) | |
download | scummvm-rg350-63ddc1ba6fdfaa4ef9a60fe5a4457512bbe3371f.tar.gz scummvm-rg350-63ddc1ba6fdfaa4ef9a60fe5a4457512bbe3371f.tar.bz2 scummvm-rg350-63ddc1ba6fdfaa4ef9a60fe5a4457512bbe3371f.zip |
Using AppandableAudioStream::getTotalPlayTime() instead of the difference between current and start time to sync audio and video
svn-id: r35315
Diffstat (limited to 'engines/gob/coktelvideo.cpp')
-rw-r--r-- | engines/gob/coktelvideo.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index 555ce1612c..cb3449615b 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -330,7 +330,7 @@ void Imd::waitEndFrame() { if (_skipFrames == 0) { int32 waitTime = (int16) (((_curFrame * _soundSliceLength) - - ((g_system->getMillis() - _soundStartTime) << 16)) >> 16); + (_audioStream->getTotalPlayTime() << 16)) >> 16); if (waitTime < 0) { _skipFrames = -waitTime / (_soundSliceLength >> 16); @@ -344,11 +344,6 @@ void Imd::waitEndFrame() { g_system->delayMillis(_frameLength); } -void Imd::notifyPaused(uint32 duration) { - if (_soundStage == 2) - _soundStartTime += duration; -} - void Imd::copyCurrentFrame(byte *dest, uint16 left, uint16 top, uint16 width, uint16 height, uint16 x, uint16 y, uint16 pitch, int16 transp) { @@ -444,7 +439,6 @@ void Imd::clear(bool del) { _hasSound = false; _soundEnabled = false; _soundStage = 0; - _soundStartTime = 0; _skipFrames = 0; _soundFlags = 0; @@ -638,7 +632,6 @@ CoktelVideo::State Imd::processFrame(uint16 frame) { if (startSound && _soundEnabled) { _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_audioHandle, _audioStream); - _soundStartTime = g_system->getMillis(); _skipFrames = 0; _soundStage = 2; } @@ -1276,7 +1269,6 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) { if (startSound && _soundEnabled) { _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_audioHandle, _audioStream); - _soundStartTime = g_system->getMillis(); _skipFrames = 0; _soundStage = 2; } |