aboutsummaryrefslogtreecommitdiff
path: root/backends/text-to-speech
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-22 17:19:52 -0700
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commit063107083340c9572250c75347ff4b7880a1770b (patch)
treec4a1f3ca03647c119ba5536142c1abe0dd7d28bf /backends/text-to-speech
parente4363ba2292cb2e1c1a02e7dcdb1914f469efe0b (diff)
downloadscummvm-rg350-063107083340c9572250c75347ff4b7880a1770b.tar.gz
scummvm-rg350-063107083340c9572250c75347ff4b7880a1770b.tar.bz2
scummvm-rg350-063107083340c9572250c75347ff4b7880a1770b.zip
TTS: Fix state switching on windows
Voice is changed when changing language on windows, so when poping state, the voice, that should get set has to be saved before changing the language. The speech shouldn't continue when changing state, so it is stopped in pushState and popState.
Diffstat (limited to 'backends/text-to-speech')
-rw-r--r--backends/text-to-speech/windows/windows-text-to-speech.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index 58389e5141..d102300028 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -181,6 +181,7 @@ void WindowsTextToSpeechManager::setVoice(unsigned index) {
if(_speechState == BROKEN || _speechState == NO_VOICE)
return;
_voice->SetVoice((ISpObjectToken *) _ttsState->_availableVoices[index].getData());
+ _ttsState->_activeVoice = index;
}
void WindowsTextToSpeechManager::setRate(int rate) {