mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +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() {
|
void MusicDriver::stopFX() {
|
||||||
if (_fxPlaying) {
|
resetFX();
|
||||||
resetFX();
|
_fxPlaying = false;
|
||||||
_fxPlaying = false;
|
_fxStartPtr = _fxDataPtr = nullptr;
|
||||||
_fxStartPtr = _fxDataPtr = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MusicDriver::playSong(const byte *data) {
|
void MusicDriver::playSong(const byte *data) {
|
||||||
|
@ -61,4 +61,10 @@ bool Sound::isPlaying() const {
|
|||||||
return _mixer->isSoundHandleActive(_soundHandle);
|
return _mixer->isSoundHandleActive(_soundHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sound::stopAllAudio() {
|
||||||
|
stopSong();
|
||||||
|
stopFX();
|
||||||
|
stopSound();
|
||||||
|
}
|
||||||
|
|
||||||
} // End of namespace Xeen
|
} // End of namespace Xeen
|
||||||
|
@ -61,6 +61,11 @@ public:
|
|||||||
* @remarks In the original, passing 0 to playSound returned play status
|
* @remarks In the original, passing 0 to playSound returned play status
|
||||||
*/
|
*/
|
||||||
bool isPlaying() const;
|
bool isPlaying() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops all playing music, FX, and sound samples
|
||||||
|
*/
|
||||||
|
void stopAllAudio();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Xeen
|
} // End of namespace Xeen
|
||||||
|
@ -124,6 +124,7 @@ Common::Error XeenEngine::run() {
|
|||||||
if (shouldQuit())
|
if (shouldQuit())
|
||||||
return Common::kNoError;
|
return Common::kNoError;
|
||||||
File::setCurrentArchive(GAME_ARCHIVE);
|
File::setCurrentArchive(GAME_ARCHIVE);
|
||||||
|
_sound->stopAllAudio();
|
||||||
|
|
||||||
showMainMenu();
|
showMainMenu();
|
||||||
if (shouldQuit())
|
if (shouldQuit())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user