GRIM: Move SMUSH audio pausing into generic movie backend.

This commit is contained in:
Josh Matthews 2011-09-06 11:13:21 -04:00
parent 452b3efde5
commit d4d2cb1494
4 changed files with 8 additions and 7 deletions

View File

@ -20,6 +20,8 @@
*
*/
#include "common/system.h"
#include "engines/grim/movie/movie.h"
#if !defined(USE_MPEG2) || !defined(USE_SMUSH) || !defined(USE_BINK)
@ -30,6 +32,11 @@ namespace Grim {
MoviePlayer *g_movie;
void MoviePlayer::pause(bool p) {
_videoPause = p;
g_system->getMixer()->pauseHandle(_soundHandle, p);
}
// Fallback for when USE_MPEG2 isnt defined, might want to do something similar
// for USE_BINK if that comes over from ScummVM

View File

@ -85,7 +85,7 @@ public:
virtual bool play(const char *filename, bool looping, int x, int y) = 0;
virtual void stop() = 0;
virtual void pause(bool p) { _videoPause = p; }
virtual void pause(bool p);
virtual bool isPlaying() { return !_videoFinished; }
virtual bool isUpdateNeeded() { return _updateNeeded; }
virtual byte *getDstPtr() { return _externalBuffer; }

View File

@ -546,11 +546,6 @@ bool SmushPlayer::play(const char *filename, bool looping, int x, int y) {
return true;
}
void SmushPlayer::pause(bool p) {
MoviePlayer::pause(p);
g_system->getMixer()->pauseHandle(_soundHandle, p);
}
void SmushPlayer::saveState(SaveGame *state) {
state->beginSection('SMUS');

View File

@ -71,7 +71,6 @@ private:
void parseNextFrame();
void init();
void deinit();
void pause(bool p);
void handleDeltaPalette(byte *src, int32 size);
void handleFramesHeader();
void handleFrameDemo();