diff options
author | Matthew Hoops | 2012-09-22 15:01:26 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-09-22 15:03:15 -0400 |
commit | 48c70d872e223dab3a05b7ca5e0f2a75e0b853ea (patch) | |
tree | 43a72f0eeb48c3599b96b6bf6d748a14b8c4bb7c | |
parent | 9a1bdfbd0838fd895cac445f051b109914f51f73 (diff) | |
download | scummvm-rg350-48c70d872e223dab3a05b7ca5e0f2a75e0b853ea.tar.gz scummvm-rg350-48c70d872e223dab3a05b7ca5e0f2a75e0b853ea.tar.bz2 scummvm-rg350-48c70d872e223dab3a05b7ca5e0f2a75e0b853ea.zip |
VIDEO: Fix pausing audio in videos
-rw-r--r-- | video/video_decoder.cpp | 5 | ||||
-rw-r--r-- | video/video_decoder.h | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index b4f44d91b5..c1d194a18f 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -386,6 +386,11 @@ bool VideoDecoder::Track::rewind() { return seek(Audio::Timestamp(0, 1000)); } +void VideoDecoder::Track::pause(bool shouldPause) { + _paused = shouldPause; + pauseIntern(shouldPause); +} + Audio::Timestamp VideoDecoder::Track::getDuration() const { return Audio::Timestamp(0, 1000); } diff --git a/video/video_decoder.h b/video/video_decoder.h index 59cce2e327..cc7d1df51b 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -433,7 +433,7 @@ protected: /** * Set the pause status of the track. */ - void pause(bool shouldPause) {} + void pause(bool shouldPause); /** * Return if the track is paused. @@ -451,7 +451,7 @@ protected: /** * Function called by pause() for subclasses to implement. */ - void pauseIntern(bool pause); + virtual void pauseIntern(bool shouldPause) {} private: bool _paused; @@ -597,7 +597,7 @@ protected: virtual Audio::Mixer::SoundType getSoundType() const { return Audio::Mixer::kPlainSoundType; } protected: - void pauseIntern(bool pause); + void pauseIntern(bool shouldPause); /** * Get the AudioStream that is the representation of this AudioTrack |