Commit 9e707210 authored by pixhawk's avatar pixhawk

Windows Speech API (SAPI) is now only supported with MSVC compiler.

parent 64c3c562
...@@ -133,7 +133,7 @@ win32 { ...@@ -133,7 +133,7 @@ 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 "C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
debug { debug {
DESTDIR = $$BASEDIR/bin DESTDIR = $$BASEDIR/bin
......
...@@ -40,8 +40,8 @@ This file is part of the PIXHAWK project ...@@ -40,8 +40,8 @@ This file is part of the PIXHAWK project
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
#endif #endif
#ifdef _WIN32 // Speech synthesis is only supported with MSVC compiler
//#include <windows.h> #if _MSC_VER
#include <sapi.h> #include <sapi.h>
using System; using System;
using System.Speech.Synthesis; using System.Speech.Synthesis;
...@@ -118,7 +118,8 @@ bool GAudioOutput::say(QString text, int severity) ...@@ -118,7 +118,8 @@ bool GAudioOutput::say(QString text, int severity)
if (!emergency) if (!emergency)
{ {
#ifdef _WIN32 // Speech synthesis is only supported with MSVC compiler
#if _MSC_VER
SpeechSynthesizer synth = new SpeechSynthesizer(); SpeechSynthesizer synth = new SpeechSynthesizer();
synth.SelectVoice("Microsoft Anna"); synth.SelectVoice("Microsoft Anna");
synth.SpeakText("Hello, world!"); synth.SpeakText("Hello, world!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment