From 0ccde72bf2873e060ed8ff0693747424c5cef0b1 Mon Sep 17 00:00:00 2001 From: Thorvald Natvig Date: Mon, 17 Mar 2008 00:28:34 +0000 Subject: Make all audio modules for Unix optional, as well as dbus and speechd (CONFIG+=no-whatver) git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@989 05730e5d-ab1b-0410-a4ac-84af385074fa --- src/mumble/TextToSpeech_unix.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mumble/TextToSpeech_unix.cpp') diff --git a/src/mumble/TextToSpeech_unix.cpp b/src/mumble/TextToSpeech_unix.cpp index a26513083..2ef15ca06 100644 --- a/src/mumble/TextToSpeech_unix.cpp +++ b/src/mumble/TextToSpeech_unix.cpp @@ -33,8 +33,10 @@ #include class TextToSpeechPrivate { +#ifdef USE_SPEECHD protected: SPDConnection *spd; +#endif public: TextToSpeechPrivate(); ~TextToSpeechPrivate(); @@ -42,6 +44,7 @@ class TextToSpeechPrivate { void setVolume(int v); }; +#ifdef USE_SPEECHD TextToSpeechPrivate::TextToSpeechPrivate() { spd = spd_open("Mumble", NULL, NULL, SPD_MODE_THREADED); if (! spd) { @@ -70,6 +73,21 @@ void TextToSpeechPrivate::setVolume(int vol) { if (spd) spd_set_volume(spd, vol * 2 - 100); } +#else +TextToSpeechPrivate::TextToSpeechPrivate() { + qWarning("TextToSpeech: Compiled without support for speech-dispatcher"); +} + +TextToSpeechPrivate::~TextToSpeechPrivate() { +} + +void TextToSpeechPrivate::say(const QString &) { +} + +void TextToSpeechPrivate::setVolume(int) { +} +#endif + TextToSpeech::TextToSpeech(QObject *p) : QObject(p) { enabled = true; -- cgit v1.2.3