mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 06:00:48 +00:00
GRIM: Move SMUSH audio pausing into generic movie backend.
This commit is contained in:
parent
452b3efde5
commit
d4d2cb1494
@ -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
|
||||
|
||||
|
@ -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; }
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user