Browse Source

Working on windows audio

QGC4.4
pixhawk 15 years ago
parent
commit
2075abda52
  1. 3
      mavground.pri
  2. 7
      src/GAudioOutput.cc

3
mavground.pri

@ -135,7 +135,8 @@ win32 {
LIBS += -L$$BASEDIR\lib\sdl\win32 \ LIBS += -L$$BASEDIR\lib\sdl\win32 \
-lmingw32 -lSDLmain -lSDL -mwindows -lmingw32 -lSDLmain -lSDL -mwindows
INCLUDEPATH += $$BASEDIR/lib/sdl/include INCLUDEPATH += $$BASEDIR/lib/sdl/include \
C:\Program Files\Microsoft SDKs\Windows\v7.0\Include
debug { debug {
DESTDIR = $$BASEDIR/bin DESTDIR = $$BASEDIR/bin

7
src/GAudioOutput.cc

@ -40,8 +40,9 @@ This file is part of the PIXHAWK project
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
#endif #endif
#ifdef Q_OS_WINDOWS #ifdef _WIN32
#include <windows.h> //#include <windows.h>
#include <sapi.h>
using System; using System;
using System.Speech.Synthesis; using System.Speech.Synthesis;
#endif #endif
@ -117,7 +118,7 @@ bool GAudioOutput::say(QString text, int severity)
if (!emergency) if (!emergency)
{ {
#ifdef Q_OS_WINDOWS #ifdef _WIN32
SpeechSynthesizer synth = new SpeechSynthesizer(); SpeechSynthesizer synth = new SpeechSynthesizer();
synth.SelectVoice("Microsoft Anna"); synth.SelectVoice("Microsoft Anna");
synth.SpeakText("Hello, world!"); synth.SpeakText("Hello, world!");

Loading…
Cancel
Save