aboutsummaryrefslogtreecommitdiff
path: root/backends/text-to-speech
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-19 09:56:26 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commit3027acc12e97fe92f617dd4a95a5861625773c38 (patch)
treed91e28dc4361f8c47688f363265a5c248daf322a /backends/text-to-speech
parentb5d5576f90c177c54170a4e68b251c2fd5219260 (diff)
downloadscummvm-rg350-3027acc12e97fe92f617dd4a95a5861625773c38.tar.gz
scummvm-rg350-3027acc12e97fe92f617dd4a95a5861625773c38.tar.bz2
scummvm-rg350-3027acc12e97fe92f617dd4a95a5861625773c38.zip
TTS: Minor refactorisations
- Add comment to tts initialization on Windows - Correctly free the voicesInfo in linux ttsMan - Remove popState method from linux-text-to-speech.h and windows-text-to-speech.h - Add tts to help in configure - Refactor language setting in gui-manager.cpp It counted with english being the default language in ttsMan constructors, which isn't true anymore.
Diffstat (limited to 'backends/text-to-speech')
-rw-r--r--backends/text-to-speech/linux/linux-text-to-speech.cpp5
-rw-r--r--backends/text-to-speech/linux/linux-text-to-speech.h2
-rw-r--r--backends/text-to-speech/windows/windows-text-to-speech.h2
3 files changed, 5 insertions, 4 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 9abe805767..d6195229c5 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.cpp
+++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp
@@ -256,6 +256,11 @@ void LinuxTextToSpeechManager::updateVoices() {
createVoice(SPD_CHILD_MALE, Common::TTSVoice::MALE, Common::TTSVoice::CHILD, voiceInfo[6]);
createVoice(SPD_CHILD_FEMALE, Common::TTSVoice::FEMALE, Common::TTSVoice::CHILD, voiceInfo[7]);
+ for (int i = 0; i < 8; i++)
+ free(voiceInfo[i]);
+
+ free(voiceInfo);
+
}
void LinuxTextToSpeechManager::freeVoiceData(void *data) {
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.h b/backends/text-to-speech/linux/linux-text-to-speech.h
index feb595095e..a6994f7f40 100644
--- a/backends/text-to-speech/linux/linux-text-to-speech.h
+++ b/backends/text-to-speech/linux/linux-text-to-speech.h
@@ -63,8 +63,6 @@ public:
virtual void setLanguage(Common::String language);
- bool popState();
-
void updateState(SpeechState state);
virtual void freeVoiceData(void *data);
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.h b/backends/text-to-speech/windows/windows-text-to-speech.h
index 6498c9cc2c..87e4ceb218 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.h
+++ b/backends/text-to-speech/windows/windows-text-to-speech.h
@@ -64,8 +64,6 @@ public:
virtual void setLanguage(Common::String language);
- bool popState();
-
virtual void freeVoiceData(void *data);
private: