diff options
Diffstat (limited to 'backends/text-to-speech')
-rw-r--r-- | backends/text-to-speech/linux/linux-text-to-speech.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp index 20ba07d74d..cc506db333 100644 --- a/backends/text-to-speech/linux/linux-text-to-speech.cpp +++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp @@ -218,8 +218,12 @@ bool LinuxTextToSpeechManager::resume() { if (_speechQueue.size()) { _speechState = SPEAKING; for (Common::List<Common::String>::iterator i = _speechQueue.begin(); i != _speechQueue.end(); i++) { - if (spd_say(_connection, SPD_MESSAGE, i->c_str()) == -1) + if (spd_say(_connection, SPD_MESSAGE, i->c_str()) == -1) { + if (_connection != 0) + spd_close(_connection); + init(); return true; + } } } else |