aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorMax Horn2010-01-09 22:37:10 +0000
committerMax Horn2010-01-09 22:37:10 +0000
commita44c6e43233ffd4b89fb6a6a96e156cd43412c3d (patch)
tree4c0ee8aa9344980aca973eb1b18edfaa8350afc5 /engines/sword1
parent4a832ceb0179d280a5baca9db462cf9124d088e2 (diff)
downloadscummvm-rg350-a44c6e43233ffd4b89fb6a6a96e156cd43412c3d.tar.gz
scummvm-rg350-a44c6e43233ffd4b89fb6a6a96e156cd43412c3d.tar.bz2
scummvm-rg350-a44c6e43233ffd4b89fb6a6a96e156cd43412c3d.zip
Add Mixer::getElapsedTime() method returning a Timestamp, thus offering a higher precision than Mixer::getSoundElapsedTime(). Convert some video code to use it.
svn-id: r47213
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/animation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 706bee4b92..b3c90e3204 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -259,7 +259,8 @@ int32 DXADecoderWithSound::getAudioLag() {
int32 videoTime = _videoInfo.currentFrame * frameDelay;
int32 audioTime;
- audioTime = (((int32) _mixer->getSoundElapsedTime(*_bgSoundHandle)) * 100);
+ const Audio::Timestamp ts = _mixer->getElapsedTime(*_bgSoundHandle);
+ audioTime = ts.convertToFramerate(100000).totalNumberOfFrames();
return videoTime - audioTime;
}