MORTEVIELLE: Return old code to waitSpeech

The waitSpeech should use the old code, when just sound is playing
(the TTS isn't speaking).
This commit is contained in:
Jaromir Wysoglad
2019-09-01 22:47:55 +03:00
committed by Filippos Karapetis
parent c9ec089e61
commit 2ecbf9ac18
+13 -6
View File
@@ -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);
}