Commit 91bfe56b authored by pixhawk's avatar pixhawk

Fixed Linux compatibility of Linux Qt Phonon support

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