aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-10-16 18:42:16 +0200
committerJaromir Wysoglad2019-10-16 19:30:56 +0200
commitb9d3c84db4e10cc0e55e4c2a12e288c17c7e66d2 (patch)
treea2c4d3931b78579b04a737094d29e2b6cf21a278 /backends
parent94d17b1853a77db0bf34cb6192d88a58d0766130 (diff)
downloadscummvm-rg350-b9d3c84db4e10cc0e55e4c2a12e288c17c7e66d2.tar.gz
scummvm-rg350-b9d3c84db4e10cc0e55e4c2a12e288c17c7e66d2.tar.bz2
scummvm-rg350-b9d3c84db4e10cc0e55e4c2a12e288c17c7e66d2.zip
TTS: Fix language setting.
Diffstat (limited to 'backends')
-rw-r--r--backends/text-to-speech/linux/linux-text-to-speech.cpp4
-rw-r--r--backends/text-to-speech/windows/windows-text-to-speech.cpp6
2 files changed, 4 insertions, 6 deletions
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp
index ccedb6bf6b..5943b69f49 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.cpp
+++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp
@@ -330,8 +330,8 @@ void SpeechDispatcherManager::setVolume(unsigned volume) {
void SpeechDispatcherManager::setLanguage(Common::String language) {
if (_speechState == BROKEN)
return;
- spd_set_language(_connection, language.c_str());
- _ttsState->_language = language;
+ Common::TextToSpeechManager::setLanguage(language);
+ spd_set_language(_connection, _ttsState->_language.c_str());
setVoice(_ttsState->_activeVoice);
}
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 0e794d7baa..2b405f5553 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -338,9 +338,7 @@ void WindowsTextToSpeechManager::setVolume(unsigned volume) {
}
void WindowsTextToSpeechManager::setLanguage(Common::String language) {
- if (language == "C")
- language = "en";
- _ttsState->_language = language;
+ Common::TextToSpeechManager::setLanguage(language);
updateVoices();
setVoice(0);
}
@@ -471,7 +469,7 @@ void WindowsTextToSpeechManager::updateVoices() {
if (_ttsState->_availableVoices.empty()) {
_speechState = NO_VOICE;
- warning("No voice is available");
+ warning("No voice is available for language: %s", _ttsState->_language.c_str());
} else if (_speechState == NO_VOICE)
_speechState = READY;
}