diff options
author | Jaromir Wysoglad | 2019-07-24 11:32:31 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | c7dbf192ef2122cfaa82ffb3ae3bc05ae10e1e12 (patch) | |
tree | f8f0a1c90c2bbb7ac85e6caa219ca940ee76ebcd | |
parent | 1795206289c0d3c3dd7ad24c8f19ee3700b2ac83 (diff) | |
download | scummvm-rg350-c7dbf192ef2122cfaa82ffb3ae3bc05ae10e1e12.tar.gz scummvm-rg350-c7dbf192ef2122cfaa82ffb3ae3bc05ae10e1e12.tar.bz2 scummvm-rg350-c7dbf192ef2122cfaa82ffb3ae3bc05ae10e1e12.zip |
TTS: Remove unneeded code
Remove debuging outputs
Remove commented iconv implementation of text conversion to UTF-8
-rw-r--r-- | backends/text-to-speech/linux/linux-text-to-speech.cpp | 30 | ||||
-rw-r--r-- | backends/text-to-speech/windows/windows-text-to-speech.cpp | 1 | ||||
-rw-r--r-- | common/text-to-speech.h | 1 | ||||
-rw-r--r-- | engines/mortevielle/sound.cpp | 1 |
4 files changed, 0 insertions, 33 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 8c797d7cb2..828eb877b3 100644 --- a/backends/text-to-speech/linux/linux-text-to-speech.cpp +++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp @@ -31,7 +31,6 @@ //#include <iconv.h> #include "common/translation.h" -#include "common/debug.h" #include "common/system.h" #include "common/ustr.h" #include "common/config-manager.h" @@ -124,33 +123,6 @@ Common::String LinuxTextToSpeechManager::strToUtf8(Common::String str, Common::S warning("Could not convert text to UTF-8"); return result; - - // ICONV implementation (supports more charsets) - /*size_t inbytes = str.size(); - char *inStr = new char[inbytes + 1]; - char *in = inStr; - strcpy(inStr, str.c_str()); - - size_t outbytes = str.size() * 2 - 1; - char *destStr = new char[outbytes + 1]; - char *out = destStr; - iconv_t conv = iconv_open("UTF-8//IGNORE", charset.c_str()); - - if (conv == (iconv_t)-1) { - warning("Could not convert string from: %s to UTF-8", charset.c_str()); - return ""; - } - - if (iconv(conv, &in, &inbytes, &out, &outbytes) == (size_t)-1) { - warning("Could not convert string from: %s to UTF-8", charset.c_str()); - return ""; - } - - destStr[outbytes + 1] = 0; - Common::String result = destStr; - delete[] inStr; - delete[] destStr; - return result; */ #else return Common::String(); #endif @@ -167,13 +139,11 @@ bool LinuxTextToSpeechManager::say(Common::String str, Common::String charset) { charset = "ASCII"; #endif } - debug("charset: %s", charset.c_str()); str = strToUtf8(str, charset); if (isSpeaking()) stop(); - debug("say: %s", str.c_str()); if(spd_say(_connection, SPD_MESSAGE, str.c_str()) == -1) { //restart the connection if (_connection != 0) 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 f5c88ff12d..21ab0242b1 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.cpp +++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp @@ -38,7 +38,6 @@ #include "common/translation.h" -#include "common/debug.h" #include "common/system.h" #include "common/ustr.h" #include "common/config-manager.h" diff --git a/common/text-to-speech.h b/common/text-to-speech.h index 678810a741..cefbb7177e 100644 --- a/common/text-to-speech.h +++ b/common/text-to-speech.h @@ -28,7 +28,6 @@ #if defined(USE_TTS) #include "common/array.h" -#include "common/debug.h" namespace Common { diff --git a/engines/mortevielle/sound.cpp b/engines/mortevielle/sound.cpp index 8f96c5bcec..66f421e31f 100644 --- a/engines/mortevielle/sound.cpp +++ b/engines/mortevielle/sound.cpp @@ -793,7 +793,6 @@ void SoundManager::startSpeech(int rep, int ht, int typ) { else { voiceIndex %= voices.size(); _ttsMan->setVoice(voices[voiceIndex]); - debug("voice set: %d", voices[voiceIndex]); } // If the selected voice is a different gender, than we want, just try to // set the pitch so it may sound a little bit closer to the gender we want |