Commit 3385b837 authored by lm's avatar lm

Merge branch 'master' of git@pixhawk.ethz.ch:groundcontrol

parents 9c256d6e cac60218
...@@ -36,10 +36,7 @@ This file is part of the PIXHAWK project ...@@ -36,10 +36,7 @@ This file is part of the PIXHAWK project
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
#endif #endif
#ifdef Q_OS_LINUX
#include <flite.h>
#endif
#include <Phonon>
#include <QTemporaryFile> #include <QTemporaryFile>
#include <QDebug> #include <QDebug>
...@@ -79,7 +76,9 @@ GAudioOutput* GAudioOutput::instance() ...@@ -79,7 +76,9 @@ GAudioOutput* GAudioOutput::instance()
} }
GAudioOutput::GAudioOutput(QObject* parent) : QObject(parent), GAudioOutput::GAudioOutput(QObject* parent) : QObject(parent),
#ifdef Q_OS_LINUX
voice(NULL), voice(NULL),
#endif
voiceIndex(0), voiceIndex(0),
emergency(false) emergency(false)
{ {
...@@ -236,13 +235,12 @@ extern "C" { ...@@ -236,13 +235,12 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
QStringList GAudioOutput::listVoices(void) QStringList GAudioOutput::listVoices(void)
{ {
QStringList l;
#ifdef Q_OS_LINUX
cst_voice *voice; cst_voice *voice;
const cst_val *v; const cst_val *v;
QStringList l;
#ifndef _WIN32
/* /*
printf("Voices available: "); printf("Voices available: ");
for (v=flite_voice_list; v; v=val_cdr(v)) for (v=flite_voice_list; v; v=val_cdr(v))
......
...@@ -35,8 +35,16 @@ This file is part of the PIXHAWK project ...@@ -35,8 +35,16 @@ This file is part of the PIXHAWK project
#include <QObject> #include <QObject>
#include <QTimer> #include <QTimer>
#include <QStringList> #include <QStringList>
#ifdef Q_OS_MAC
#include <Phonon>
#endif
#ifdef Q_OS_LINUX
#include <flite.h> #include <flite.h>
#include <phonon>
#endif
#ifdef Q_OS_WIN
#include <Phonon> #include <Phonon>
#endif
/* For Snow leopard and later /* For Snow leopard and later
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
...@@ -77,10 +85,12 @@ public slots: ...@@ -77,10 +85,12 @@ public slots:
void beep(); void beep();
protected: protected:
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
//NSSpeechSynthesizer //NSSpeechSynthesizer
#endif #endif
#ifdef Q_OS_LINUX
cst_voice* voice; ///< The flite voice object cst_voice* voice; ///< The flite voice object
#endif
int voiceIndex; ///< The index of the flite voice to use (awb, slt, rms) int voiceIndex; ///< The index of the flite voice to use (awb, slt, rms)
Phonon::MediaObject* m_media; ///< The output object for audio Phonon::MediaObject* m_media; ///< The output object for audio
Phonon::AudioOutput* m_audioOutput; Phonon::AudioOutput* m_audioOutput;
......
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