diff options
Diffstat (limited to 'backends/text-to-speech')
3 files changed, 8 insertions, 0 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 5943b69f49..b4a0d8c393 100644 --- a/backends/text-to-speech/linux/linux-text-to-speech.cpp +++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp @@ -127,6 +127,9 @@ void SpeechDispatcherManager::init() { SpeechDispatcherManager::~SpeechDispatcherManager() { stop(); + + clearState(); + if (_connection != 0) spd_close(_connection); if (_threadCreated) diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.mm b/backends/text-to-speech/macosx/macosx-text-to-speech.mm index 72f56f91be..4d232f3b95 100644 --- a/backends/text-to-speech/macosx/macosx-text-to-speech.mm +++ b/backends/text-to-speech/macosx/macosx-text-to-speech.mm @@ -66,6 +66,8 @@ MacOSXTextToSpeechManager::MacOSXTextToSpeechManager() : Common::TextToSpeechMan } MacOSXTextToSpeechManager::~MacOSXTextToSpeechManager() { + clearState(); + [synthesizer release]; [synthesizerDelegate release]; } diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp index 9f4ecf742a..a398200bad 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.cpp +++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp @@ -120,6 +120,9 @@ void WindowsTextToSpeechManager::init() { WindowsTextToSpeechManager::~WindowsTextToSpeechManager() { stop(); + + clearState(); + if (_thread != NULL) { WaitForSingleObject(_thread, INFINITE); CloseHandle(_thread); |