Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
0700a1e7
Commit
0700a1e7
authored
Oct 31, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Audio for Windows
parent
a353542a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
420 additions
and
361 deletions
+420
-361
GAudioOutput.cc
src/GAudioOutput.cc
+395
-352
GAudioOutput.h
src/GAudioOutput.h
+25
-9
No files found.
src/GAudioOutput.cc
View file @
0700a1e7
This diff is collapsed.
Click to expand it.
src/GAudioOutput.h
View file @
0700a1e7
...
...
@@ -59,10 +59,21 @@ This file is part of the PIXHAWK project
extern
"C"
{
cst_voice
*
REGISTER_VOX
(
const
char
*
voxdir
);
void
UNREGISTER_VOX
(
cst_voice
*
vox
);
cst_voice
*
register_cmu_us_kal16
(
const
char
*
voxdir
);
cst_voice
*
register_cmu_us_kal16
(
const
char
*
voxdir
);
}
#endif
#if _MSC_VER
// Documentation: http://msdn.microsoft.com/en-us/library/ee125082%28v=VS.85%29.aspx
#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override something,
//but do not change the name of _Module
extern
CComModule
_Module
;
#include <atlcom.h>
#include <sapi.h>
#endif
/**
* @brief Audio Output (speech synthesizer and "beep" output)
* This class follows the singleton design pattern
...
...
@@ -73,10 +84,11 @@ class GAudioOutput : public QObject
Q_OBJECT
public:
/** @brief Get the singleton instance */
static
GAudioOutput
*
instance
();
static
GAudioOutput
*
instance
();
/** @brief List available voices */
QStringList
listVoices
(
void
);
enum
{
enum
{
VOICE_MALE
=
0
,
VOICE_FEMALE
}
QGVoice
;
...
...
@@ -86,7 +98,7 @@ public:
public
slots
:
/** @brief Say this text if current output priority matches */
bool
say
(
QString
text
,
int
severity
=
1
);
bool
say
(
QString
text
,
int
severity
=
1
);
/** @brief Play alert sound and say notification message */
bool
alert
(
QString
text
);
/** @brief Start emergency sound */
...
...
@@ -115,16 +127,20 @@ protected:
#endif
#ifdef Q_OS_LINUX
//cst_voice* voice; ///< The flite voice object
#endif
#ifdef _MSC_VER
static
ISpVoice
*
pVoice
;
#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
;
Phonon
::
MediaObject
*
m_media
;
///< The output object for audio
Phonon
::
AudioOutput
*
m_audioOutput
;
bool
emergency
;
///< Emergency status flag
QTimer
*
emergencyTimer
;
QTimer
*
emergencyTimer
;
bool
muted
;
private:
GAudioOutput
(
QObject
*
parent
=
NULL
);
//
~GAudioOutput();
GAudioOutput
(
QObject
*
parent
=
NULL
);
~
GAudioOutput
();
};
#endif // AUDIOOUTPUT_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment