aboutsummaryrefslogtreecommitdiff
path: root/common/text-to-speech.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/text-to-speech.cpp')
-rw-r--r--common/text-to-speech.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/text-to-speech.cpp b/common/text-to-speech.cpp
index ce9f4a9076..9ff8d50641 100644
--- a/common/text-to-speech.cpp
+++ b/common/text-to-speech.cpp
@@ -109,5 +109,22 @@ void TextToSpeechManager::pushState() {
updateVoices();
}
+bool TextToSpeechManager::popState() {
+ if (_ttsState->_next == nullptr)
+ return true;
+
+ Common::TTSState *oldState = _ttsState;
+ _ttsState = _ttsState->_next;
+
+ delete oldState;
+
+ setLanguage(_ttsState->_language);
+ setPitch(_ttsState->_pitch);
+ setVolume(_ttsState->_volume);
+ setRate(_ttsState->_rate);
+ setVoice(_ttsState->_activeVoice);
+ return false;
+}
+
}
#endif