mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
XEEN: Stop audio if intro sequence aborted
This commit is contained in:
parent
5e133cdd34
commit
94cee9dead
@ -212,11 +212,9 @@ void MusicDriver::playFX(uint effectId, const byte *data) {
|
||||
}
|
||||
|
||||
void MusicDriver::stopFX() {
|
||||
if (_fxPlaying) {
|
||||
resetFX();
|
||||
_fxPlaying = false;
|
||||
_fxStartPtr = _fxDataPtr = nullptr;
|
||||
}
|
||||
resetFX();
|
||||
_fxPlaying = false;
|
||||
_fxStartPtr = _fxDataPtr = nullptr;
|
||||
}
|
||||
|
||||
void MusicDriver::playSong(const byte *data) {
|
||||
|
@ -61,4 +61,10 @@ bool Sound::isPlaying() const {
|
||||
return _mixer->isSoundHandleActive(_soundHandle);
|
||||
}
|
||||
|
||||
void Sound::stopAllAudio() {
|
||||
stopSong();
|
||||
stopFX();
|
||||
stopSound();
|
||||
}
|
||||
|
||||
} // End of namespace Xeen
|
||||
|
@ -61,6 +61,11 @@ public:
|
||||
* @remarks In the original, passing 0 to playSound returned play status
|
||||
*/
|
||||
bool isPlaying() const;
|
||||
|
||||
/**
|
||||
* Stops all playing music, FX, and sound samples
|
||||
*/
|
||||
void stopAllAudio();
|
||||
};
|
||||
|
||||
} // End of namespace Xeen
|
||||
|
@ -124,6 +124,7 @@ Common::Error XeenEngine::run() {
|
||||
if (shouldQuit())
|
||||
return Common::kNoError;
|
||||
File::setCurrentArchive(GAME_ARCHIVE);
|
||||
_sound->stopAllAudio();
|
||||
|
||||
showMainMenu();
|
||||
if (shouldQuit())
|
||||
|
Loading…
x
Reference in New Issue
Block a user