diff options
author | Jaromir Wysoglad | 2019-07-18 00:48:01 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | 8e4a24f55e2986de6c0556ab1a0faeeca20c724f (patch) | |
tree | 9386002c38f3988413f9a7bb6d468a662eb9bba4 /backends/text-to-speech | |
parent | 62e219ece3e77bf8f1bdcd60eeb95392c497917d (diff) | |
download | scummvm-rg350-8e4a24f55e2986de6c0556ab1a0faeeca20c724f.tar.gz scummvm-rg350-8e4a24f55e2986de6c0556ab1a0faeeca20c724f.tar.bz2 scummvm-rg350-8e4a24f55e2986de6c0556ab1a0faeeca20c724f.zip |
TTS: Unify setters between linux and win backends.
Diffstat (limited to 'backends/text-to-speech')
-rw-r--r-- | backends/text-to-speech/windows/windows-text-to-speech.cpp | 7 |
1 files changed, 4 insertions, 3 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 6f621ed5d6..f688ec1cd5 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.cpp +++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp @@ -103,7 +103,7 @@ bool WindowsTextToSpeechManager::say(Common::String str) { _audio->SetState(SPAS_STOP, 0); _audio->SetState(SPAS_RUN, 0); // We have to set the pitch by prepending xml code at the start of the said string; - Common::String pitch= Common::String::format("<pitch absmiddle=\"%d\">", _ttsState->_pitch); + Common::String pitch= Common::String::format("<pitch absmiddle=\"%d\">", _ttsState->_pitch / 10); str.replace((uint32)0, 0, pitch); WCHAR *strW = Win32::ansiToUnicode(str.c_str()); @@ -178,14 +178,15 @@ void WindowsTextToSpeechManager::setVoice(unsigned index) { void WindowsTextToSpeechManager::setRate(int rate) { if(_speechState == BROKEN || _speechState == NO_VOICE) return; - assert(rate >= -10 && rate <= 10); - _voice->SetRate(rate); + assert(rate >= -100 && rate <= 100); + _voice->SetRate(rate / 10); _ttsState->_rate = rate; } void WindowsTextToSpeechManager::setPitch(int pitch) { if(_speechState == BROKEN || _speechState == NO_VOICE) return; + assert(pitch >= -100 && pitch <= 100); _ttsState->_pitch = pitch; } |