STARK: Override the onEnginePause() in Sound

This commit is contained in:
Douglas Liu 2018-06-11 21:27:27 +08:00
parent 4f22f33fc1
commit af7338720a
3 changed files with 5 additions and 5 deletions

View File

@ -251,5 +251,9 @@ void Sound::saveLoadCurrent(ResourceSerializer *serializer) {
}
}
void Sound::onEnginePause(bool pause) {
g_system->getMixer()->pauseHandle(_handle, pause);
}
} // End of namespace Resources
} // End of namespace Stark

View File

@ -67,6 +67,7 @@ public:
void onPreDestroy() override;
void onGameLoop() override;
void saveLoadCurrent(ResourceSerializer *serializer) override;
void onEnginePause(bool pause) override;
/** Start playing the sound */
void play();

View File

@ -36,10 +36,6 @@
#include "engines/stark/resources/level.h"
#include "engines/stark/resources/location.h"
#include "engines/engine.h"
#include "audio/mixer.h"
namespace Stark {
GameScreen::GameScreen(Gfx::Driver *gfx, Cursor *cursor) :
@ -146,7 +142,6 @@ void GameScreen::pauseGame(bool pause) {
StarkGlobal->getCurrent()->getLevel()->onEnginePause(pause);
StarkGlobal->getCurrent()->getLocation()->onEnginePause(pause);
}
g_engine->_mixer->pauseAll(pause);
}
} // End of namespace Stark