aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-23 16:37:20 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commit2ecbf9ac181e21ddbb70e080d97bdda567fe2d19 (patch)
tree3184a4b276b40a35971caa8796c176b4583ad53a
parentc9ec089e6151a1a852321ccd67808cbb32e869c9 (diff)
downloadscummvm-rg350-2ecbf9ac181e21ddbb70e080d97bdda567fe2d19.tar.gz
scummvm-rg350-2ecbf9ac181e21ddbb70e080d97bdda567fe2d19.tar.bz2
scummvm-rg350-2ecbf9ac181e21ddbb70e080d97bdda567fe2d19.zip
MORTEVIELLE: Return old code to waitSpeech
The waitSpeech should use the old code, when just sound is playing (the TTS isn't speaking).
-rw-r--r--engines/mortevielle/sound.cpp19
1 files 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);
}