[Scummvm-cvs-logs] scummvm master -> 48c70d872e223dab3a05b7ca5e0f2a75e0b853ea

clone2727 clone2727 at gmail.com
Sat Sep 22 21:04:21 CEST 2012


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:
48c70d872e VIDEO: Fix pausing audio in videos


Commit: 48c70d872e223dab3a05b7ca5e0f2a75e0b853ea
    https://github.com/scummvm/scummvm/commit/48c70d872e223dab3a05b7ca5e0f2a75e0b853ea
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2012-09-22T12:03:15-07:00

Commit Message:
VIDEO: Fix pausing audio in videos

Changed paths:
    video/video_decoder.cpp
    video/video_decoder.h



diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index b4f44d9..c1d194a 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 59cce2e..cc7d1df 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






More information about the Scummvm-git-logs mailing list