XEEN: Stop audio if intro sequence aborted

This commit is contained in:
Paul Gilbert committed 2016-09-18 12:07:34 -04:00
1 parent 5e133cdd34
commit 94cee9dead
4 files changed
+15 -5

No files matched your search

+3 -5
View File
@@ -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) {
+6
View File
@@ -61,4 +61,10 @@ bool Sound::isPlaying() const {
return _mixer->isSoundHandleActive(_soundHandle);
}
void Sound::stopAllAudio() {
stopSong();
stopFX();
stopSound();
}
} // End of namespace Xeen
+5
View File
@@ -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
+1
View File
@@ -124,6 +124,7 @@ Common::Error XeenEngine::run() {
if (shouldQuit())
return Common::kNoError;
File::setCurrentArchive(GAME_ARCHIVE);
_sound->stopAllAudio();
showMainMenu();
if (shouldQuit())