aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/videoplayer.cpp
diff options
context:
space:
mode:
authorSven Hesse2011-01-24 14:10:15 +0000
committerSven Hesse2011-01-24 14:10:15 +0000
commit9eea8c6bca530e48e8c1725b3829de189f2aec0e (patch)
tree6f28c32134394064f7356779e03966fb5c33ceb5 /engines/gob/videoplayer.cpp
parent6ca13f926d6dbadf423ec71c26a21cfbae0dc5e7 (diff)
downloadscummvm-rg350-9eea8c6bca530e48e8c1725b3829de189f2aec0e.tar.gz
scummvm-rg350-9eea8c6bca530e48e8c1725b3829de189f2aec0e.tar.bz2
scummvm-rg350-9eea8c6bca530e48e8c1725b3829de189f2aec0e.zip
GOB: Wait for the exact moment of the video sound's end
This should fix all cut-off sound issues in Urban Runner svn-id: r55503
Diffstat (limited to 'engines/gob/videoplayer.cpp')
-rw-r--r--engines/gob/videoplayer.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 3cd363e8fb..2e33dbed4e 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -251,6 +251,25 @@ void VideoPlayer::pauseAll(bool pause) {
pauseVideo(i, pause);
}
+void VideoPlayer::finishVideoSound(int slot) {
+ Video *video = getVideoBySlot(slot);
+ if (!video || !video->decoder)
+ return;
+
+ video->decoder->finishSound();
+}
+
+void VideoPlayer::waitSoundEnd(int slot) {
+ Video *video = getVideoBySlot(slot);
+ if (!video || !video->decoder)
+ return;
+
+ video->decoder->finishSound();
+
+ while(video->decoder->isSoundPlaying())
+ _vm->_util->longDelay(1);
+}
+
bool VideoPlayer::play(int slot, Properties &properties) {
Video *video = getVideoBySlot(slot);
if (!video)