Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
2c7a4309
Commit
2c7a4309
authored
Jul 17, 2014
by
Susurrus
Browse files
Clean up dead code in GAudioOutput.cc
Removed or annotated existing commented-out code
parent
e42ba9be
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/GAudioOutput.cc
View file @
2c7a4309
...
@@ -46,9 +46,6 @@ This file is part of the QGROUNDCONTROL project
...
@@ -46,9 +46,6 @@ This file is part of the QGROUNDCONTROL project
#if defined _MSC_VER && defined QGC_SPEECH_ENABLED
#if defined _MSC_VER && defined QGC_SPEECH_ENABLED
// Documentation: http://msdn.microsoft.com/en-us/library/ee125082%28v=VS.85%29.aspx
// Documentation: http://msdn.microsoft.com/en-us/library/ee125082%28v=VS.85%29.aspx
#include
<sapi.h>
#include
<sapi.h>
//using System;
//using System.Speech.Synthesis;
#endif
#endif
#if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED
#if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED
...
@@ -121,17 +118,10 @@ GAudioOutput::GAudioOutput(QObject *parent) : QObject(parent),
...
@@ -121,17 +118,10 @@ GAudioOutput::GAudioOutput(QObject *parent) : QObject(parent),
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
//hr = pVoice->Speak(L"QGC audio output active!", 0, NULL);
//pVoice->Release();
//pVoice = NULL;
}
}
}
}
#endif
#endif
// Initialize audio output
//m_media = new Phonon::MediaObject(this);
//Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
//createPath(m_media, audioOutput);
// Prepare regular emergency signal, will be fired off on calling startEmergency()
// Prepare regular emergency signal, will be fired off on calling startEmergency()
emergencyTimer
=
new
QTimer
();
emergencyTimer
=
new
QTimer
();
...
@@ -245,7 +235,8 @@ void GAudioOutput::notifyPositive()
...
@@ -245,7 +235,8 @@ void GAudioOutput::notifyPositive()
if
(
!
muted
)
if
(
!
muted
)
{
{
// Use QFile to transform path for all OS
// Use QFile to transform path for all OS
QFile
f
(
QCoreApplication
::
applicationDirPath
()
+
QString
(
"/files/audio/double_notify.wav"
));
// FIXME: Get working with Qt5's QtMultimedia module
//QFile f(QCoreApplication::applicationDirPath() + QString("/files/audio/double_notify.wav"));
//m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
//m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
//m_media->play();
//m_media->play();
}
}
...
@@ -256,7 +247,8 @@ void GAudioOutput::notifyNegative()
...
@@ -256,7 +247,8 @@ void GAudioOutput::notifyNegative()
if
(
!
muted
)
if
(
!
muted
)
{
{
// Use QFile to transform path for all OS
// Use QFile to transform path for all OS
QFile
f
(
QCoreApplication
::
applicationDirPath
()
+
QString
(
"/files/audio/flat_notify.wav"
));
// FIXME: Get working with Qt5's QtMultimedia module
//QFile f(QCoreApplication::applicationDirPath() + QString("/files/audio/flat_notify.wav"));
//m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
//m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
//m_media->play();
//m_media->play();
}
}
...
@@ -306,7 +298,7 @@ void GAudioOutput::beep()
...
@@ -306,7 +298,7 @@ void GAudioOutput::beep()
{
{
if
(
!
muted
)
if
(
!
muted
)
{
{
//
TODO
: Re-enable audio beeps
//
FIXME
: Re-enable audio beeps
// Use QFile to transform path for all OS
// Use QFile to transform path for all OS
//QFile f(QCoreApplication::applicationDirPath() + QString("/files/audio/alert.wav"));
//QFile f(QCoreApplication::applicationDirPath() + QString("/files/audio/alert.wav"));
//qDebug() << "FILE:" << f.fileName();
//qDebug() << "FILE:" << f.fileName();
...
@@ -318,6 +310,7 @@ void GAudioOutput::beep()
...
@@ -318,6 +310,7 @@ void GAudioOutput::beep()
void
GAudioOutput
::
selectFemaleVoice
()
void
GAudioOutput
::
selectFemaleVoice
()
{
{
#if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED
#if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED
// FIXME: Enable selecting a female voice on all platforms
//this->voice = register_cmu_us_slt(NULL);
//this->voice = register_cmu_us_slt(NULL);
#endif
#endif
}
}
...
@@ -325,20 +318,14 @@ void GAudioOutput::selectFemaleVoice()
...
@@ -325,20 +318,14 @@ void GAudioOutput::selectFemaleVoice()
void
GAudioOutput
::
selectMaleVoice
()
void
GAudioOutput
::
selectMaleVoice
()
{
{
#if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED
#if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED
// FIXME: Enable selecting a male voice on all platforms
//this->voice = register_cmu_us_rms(NULL);
//this->voice = register_cmu_us_rms(NULL);
#endif
#endif
}
}
/*
void GAudioOutput::selectNeutralVoice()
{
#if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED
this->voice = register_cmu_us_awb(NULL);
#endif
}*/
QStringList
GAudioOutput
::
listVoices
(
void
)
QStringList
GAudioOutput
::
listVoices
(
void
)
{
{
// No voice selection is currently supported, so just return an empty list
QStringList
l
;
QStringList
l
;
return
l
;
return
l
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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