aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/gui-manager.cpp5
-rw-r--r--gui/options.cpp4
-rw-r--r--gui/widget.cpp4
3 files changed, 9 insertions, 4 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 8cb201da3a..666e079aa6 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -634,6 +634,11 @@ void GuiManager::initTextToSpeech() {
ttsMan->setLanguage(currentLanguage);
}
#endif
+ int volume = (ConfMan.getInt("speech_volume", "scummvm") * 100) / 256;
+ if (ConfMan.hasKey("mute", "scummvm") && ConfMan.getBool("mute", "scummvm"))
+ volume = 0;
+ ttsMan->setVolume(volume);
+
int voice;
if(ConfMan.hasKey("tts_voice"))
voice = ConfMan.getInt("tts_voice", "scummvm");
diff --git a/gui/options.cpp b/gui/options.cpp
index 39bf6160ea..3195694935 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2159,6 +2159,10 @@ void GlobalOptionsDialog::apply() {
ttsMan->setLanguage(guiLang);
}
}
+ int volume = (ConfMan.getInt("speech_volume", "scummvm") * 100) / 256;
+ if (ConfMan.hasKey("mute", "scummvm") && ConfMan.getBool("mute", "scummvm"))
+ volume = 0;
+ ttsMan->setVolume(volume);
ConfMan.setBool("tts_enabled", _ttsCheckbox->getState(), _domain);
int selectedVoice = _ttsVoiceSelectionPopUp->getSelectedTag();
ConfMan.setInt("tts_voice", selectedVoice, _domain);
diff --git a/gui/widget.cpp b/gui/widget.cpp
index d02d64fbeb..3269a5fd6c 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -260,10 +260,6 @@ void Widget::read(Common::String str) {
#ifdef USE_TTS
if (ConfMan.hasKey("tts_enabled", "scummvm") &&
ConfMan.getBool("tts_enabled", "scummvm")) {
- int volume = (ConfMan.getInt("speech_volume", "scummvm") * 100) / 256;
- if (ConfMan.hasKey("mute", "scummvm") && ConfMan.getBool("mute", "scummvm"))
- volume = 0;
- g_system->getTextToSpeechManager()->setVolume(volume);
g_system->getTextToSpeechManager()->say(str);
}
#endif