From 4b5b812712373a094e65506d30aa2ae611425e75 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Mon, 19 Aug 2019 14:00:23 +0200 Subject: TTS: Better documentation of TTSVoice. --- backends/text-to-speech/linux/linux-text-to-speech.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backends/text-to-speech') 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 e4843735ae..d2010831b3 100644 --- a/backends/text-to-speech/linux/linux-text-to-speech.cpp +++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp @@ -349,6 +349,9 @@ void SpeechDispatcherManager::setLanguage(Common::String language) { } void SpeechDispatcherManager::createVoice(int typeNumber, Common::TTSVoice::Gender gender, Common::TTSVoice::Age age, char *description) { + // This pointer will point to data needed for voice switching. It is stored + // in the Common::TTSVoice and it is freed by freeVoiceData() once it + // is not needed. SPDVoiceType *type = (SPDVoiceType *) malloc(sizeof(SPDVoiceType)); *type = static_cast(typeNumber); Common::TTSVoice voice(gender, age, (void *) type, description); -- cgit v1.2.3