diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2008-03-17 03:28:34 +0300 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2008-03-17 03:28:34 +0300 |
commit | 0ccde72bf2873e060ed8ff0693747424c5cef0b1 (patch) | |
tree | d337e152f769fc9cbf8f070ecd2b82b816a82d45 /src/mumble/TextToSpeech_unix.cpp | |
parent | 2bb285b7f0f54ce99503510cf5be0e7bc72d77f1 (diff) |
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
Diffstat (limited to 'src/mumble/TextToSpeech_unix.cpp')
-rw-r--r-- | src/mumble/TextToSpeech_unix.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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 <libspeechd.h> 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; |