[dasher: 58/217] Add speach stop support to SpeechDispatcher
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 58/217] Add speach stop support to SpeechDispatcher
- Date: Sat, 27 Feb 2016 12:05:12 +0000 (UTC)
commit 6e8caf740f2746938270c6e4493dd0a00d4ffc81
Author: Laetitia Baudoin <lbaudoin google com>
Date: Tue Oct 13 05:29:58 2015 -0700
Add speach stop support to SpeechDispatcher
Src/Gtk2/SpeechDispatcher.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/Src/Gtk2/SpeechDispatcher.cpp b/Src/Gtk2/SpeechDispatcher.cpp
index 8b95189..81948bc 100644
--- a/Src/Gtk2/SpeechDispatcher.cpp
+++ b/Src/Gtk2/SpeechDispatcher.cpp
@@ -22,6 +22,12 @@ bool CSpeech::Init() {
}
void CSpeech::Speak(const std::string &strText, bool bInterrupt) {
- if (Init())
+ if (!Init()) {
+ return;
+ }
+ if (!bInterrupt) {
spd_say(m_speaker, SPD_TEXT, strText.c_str());
+ } else {
+ spd_stop(m_speaker);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]