aboutsummaryrefslogtreecommitdiff
path: root/backends/text-to-speech/windows
diff options
context:
space:
mode:
Diffstat (limited to 'backends/text-to-speech/windows')
-rw-r--r--backends/text-to-speech/windows/windows-text-to-speech.cpp4
-rw-r--r--backends/text-to-speech/windows/windows-text-to-speech.h2
2 files changed, 6 insertions, 0 deletions
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 f688ec1cd5..fec5a408d1 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -360,5 +360,9 @@ bool WindowsTextToSpeechManager::popState() {
setVoice(_ttsState->_activeVoice);
return false;
}
+void WindowsTextToSpeechManager::freeVoiceData(void *data) {
+ ISpObjectToken *voiceToken = (ISpObjectToken *) data;
+ voiceToken->Release();
+}
#endif
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.h b/backends/text-to-speech/windows/windows-text-to-speech.h
index 03a1806849..2ae062ce92 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.h
+++ b/backends/text-to-speech/windows/windows-text-to-speech.h
@@ -66,6 +66,8 @@ public:
virtual bool popState();
+ virtual void freeVoiceData(void *data);
+
private:
void init();
virtual void updateVoices();