From 2ecbf9ac181e21ddbb70e080d97bdda567fe2d19 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Tue, 23 Jul 2019 16:37:20 +0200 Subject: MORTEVIELLE: Return old code to waitSpeech The waitSpeech should use the old code, when just sound is playing (the TTS isn't speaking). --- engines/mortevielle/sound.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/engines/mortevielle/sound.cpp b/engines/mortevielle/sound.cpp index 097ea8e76d..8f96c5bcec 100644 --- a/engines/mortevielle/sound.cpp +++ b/engines/mortevielle/sound.cpp @@ -848,15 +848,22 @@ void SoundManager::startSpeech(int rep, int ht, int typ) { } void SoundManager::waitSpeech() { + if (_soundType == 0) { #ifdef USE_TTS - if (!_ttsMan) - return; - while (_ttsMan->isSpeaking() && !_vm->keyPressed() && !_vm->_mouseClick && !_vm->shouldQuit()) - ; - // In case the handle is still active, stop it. - _ttsMan->stop(); + if (!_ttsMan) + return; + while (_ttsMan->isSpeaking() && !_vm->keyPressed() && !_vm->_mouseClick && !_vm->shouldQuit()) + ; + // In case the TTS is still speaking, stop it. + _ttsMan->stop(); #endif // USE_TTS + } else { + while (_mixer->isSoundHandleActive(_soundHandle) && !_vm->keyPressed() && !_vm->_mouseClick && !_vm->shouldQuit()) + ; + // In case the handle is still active, stop it. + _mixer->stopHandle(_soundHandle); + } if (!_vm->keyPressed() && !_vm->_mouseClick && !_vm->shouldQuit()) g_system->delayMillis(600); } -- cgit v1.2.3