From d77dd6c14ab6c41513ed282597a6da82289061e8 Mon Sep 17 00:00:00 2001 From: Eric Fry Date: Mon, 25 Jun 2018 22:21:51 +1000 Subject: ILLUSIONS: Pause voice when entering in-game menu Wire up load fail dialog when trying to restart from unsaved new game. --- engines/illusions/sound.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines/illusions/sound.cpp') diff --git a/engines/illusions/sound.cpp b/engines/illusions/sound.cpp index a40c43f129..bc65e37784 100644 --- a/engines/illusions/sound.cpp +++ b/engines/illusions/sound.cpp @@ -211,6 +211,12 @@ bool VoicePlayer::isCued() { return _voiceStatus == 2; } +void VoicePlayer::pause(bool paused) { + if(isPlaying()) { + g_system->getMixer()->pauseHandle(_soundHandle, paused); + } +} + // Sound Sound::Sound(uint32 soundEffectId, uint32 soundGroupId, bool looping) @@ -304,6 +310,10 @@ void SoundMan::stopVoice() { _voicePlayer->stop(); } +void SoundMan::pauseVoice(bool paused) { + _voicePlayer->pause(paused); +} + bool SoundMan::isVoicePlaying() { return _voicePlayer->isPlaying(); } -- cgit v1.2.3