TTS: Refactoring

* Delete multiple empty rows
 * Make getVolume non-virtual and leave just the implementation
    in base class
 * Resolve warning about signed / unsigned comparison in
    gui-manager
 * Clear availableVoices when updating voices on linux
 * By default set language to transMan language on windows
    (if the transMan is available)
 * Remove freeVoices method from Windows ttsMan, it isn't needed
    anymore
This commit is contained in:
Jaromir Wysoglad 2019-07-23 17:54:31 +02:00 committed by Filippos Karapetis
parent 4ec10ffec7
commit 58065ceacd
9 changed files with 10 additions and 26 deletions

View file

@ -182,7 +182,6 @@ bool LinuxTextToSpeechManager::say(Common::String str, Common::String charset) {
return true;
}
return false;
}
bool LinuxTextToSpeechManager::stop() {
@ -248,10 +247,6 @@ void LinuxTextToSpeechManager::setVolume(unsigned volume) {
_ttsState->_volume = volume;
}
int LinuxTextToSpeechManager::getVolume() {
return (_ttsState->_volume - 50) * 2;
}
void LinuxTextToSpeechManager::setLanguage(Common::String language) {
if (_speechState == BROKEN)
return;
@ -278,6 +273,7 @@ void LinuxTextToSpeechManager::updateVoices() {
it depends on the user to map them to the right voices in speech-dispatcher
configuration
*/
_ttsState->_availableVoices.clear();
char **voiceInfo = spd_list_voices(_connection);
@ -294,7 +290,6 @@ void LinuxTextToSpeechManager::updateVoices() {
free(voiceInfo[i]);
free(voiceInfo);
}
void LinuxTextToSpeechManager::freeVoiceData(void *data) {