From 6ba95152e81c8b301c8f38884f8cca7436c604fa Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Thu, 31 Jul 2014 08:40:37 -0700 Subject: [PATCH] Fixed issue with incomplete initialization of struct. Changed to get the current voice properties, then modify then and set new ones. --- src/GAudioOutput.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc index ba2787b5e..5822f9dd9 100644 --- a/src/GAudioOutput.cc +++ b/src/GAudioOutput.cc @@ -94,13 +94,13 @@ GAudioOutput::GAudioOutput(QObject *parent) : QObject(parent), #if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 500, NULL, 0); // initialize for playback with 500ms buffer and no options (see speak_lib.h) - espeak_VOICE espeak_voice = {}; - espeak_voice.languages = "en-uk"; // Default to British English - espeak_voice.identifier = NULL; // no specific voice file specified - espeak_voice.name = "klatt"; // espeak voice name - espeak_voice.gender = 2; // Female - espeak_voice.age = 0; // age not specified - espeak_SetVoiceByProperties(&espeak_voice); + espeak_VOICE *espeak_voice = espeak_GetCurrentVoice(); + espeak_voice->languages = "en-uk"; // Default to British English + espeak_voice->identifier = NULL; // no specific voice file specified + espeak_voice->name = "klatt"; // espeak voice name + espeak_voice->gender = 2; // Female + espeak_voice->age = 0; // age not specified + espeak_SetVoiceByProperties(espeak_voice); #endif #if defined _MSC_VER && defined QGC_SPEECH_ENABLED -- 2.22.0