Browse Source

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

QGC4.4
lm 15 years ago
parent
commit
3385b837e4
  1. 14
      src/GAudioOutput.cc
  2. 12
      src/GAudioOutput.h

14
src/GAudioOutput.cc

@ -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
#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() @@ -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" { @@ -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))

12
src/GAudioOutput.h

@ -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 <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: @@ -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;

Loading…
Cancel
Save