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
a64973b8
Commit
a64973b8
authored
May 22, 2014
by
Bryant Mairs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed unused variable warning in GAudioOutput when speech is disabled.
parent
e63127ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
GAudioOutput.cc
src/GAudioOutput.cc
+11
-7
No files found.
src/GAudioOutput.cc
View file @
a64973b8
...
...
@@ -187,8 +187,8 @@ bool GAudioOutput::say(QString text, int severity)
if
(
!
emergency
)
{
// Speech synthesis is only supported with MSVC compiler
#if defined _MSC_VER
&& defined QGC_SPEECH_ENABLED
#if defined QGC_SPEECH_ENABLED
#if defined _MSC_VER
/*SpeechSynthesizer synth = new SpeechSynthesizer();
synth.SelectVoice("Microsoft Anna");
synth.SpeakText(text.toStdString().c_str());
...
...
@@ -209,14 +209,14 @@ bool GAudioOutput::say(QString text, int severity)
pVoice = NULL;
}
}*/
#endif
#endif
// _MSC_VER
#if defined Q_OS_LINUX
&& defined QGC_SPEECH_ENABLED
#if defined Q_OS_LINUX
unsigned
int
espeak_size
=
strlen
(
text
.
toStdString
().
c_str
());
espeak_Synth
(
text
.
toStdString
().
c_str
(),
espeak_size
,
0
,
POS_CHARACTER
,
0
,
espeakCHARS_AUTO
,
NULL
,
NULL
);
#endif
#endif
// Q_OS_LINUX
#if defined Q_OS_MAC
&& defined QGC_SPEECH_ENABLED
#if defined Q_OS_MAC
// Slashes necessary to have the right start to the sentence
// copying data prevents SpeakString from reading additional chars
text
=
"
\\
"
+
text
;
...
...
@@ -225,7 +225,11 @@ bool GAudioOutput::say(QString text, int severity)
memcpy
(
str2
,
text
.
toAscii
().
data
(),
str
.
length
());
SpeakString
(
str2
);
res
=
true
;
#endif
#endif // Q_OS_MAC
#else
Q_UNUSED
(
text
);
#endif // QGC_SPEECH_ENABLED
}
return
res
;
...
...
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