diff options
Diffstat (limited to 'backends/text-to-speech')
-rw-r--r-- | backends/text-to-speech/windows/windows-text-to-speech.cpp | 8 |
1 files changed, 5 insertions, 3 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 196a909f2e..0731239054 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.cpp +++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp @@ -165,9 +165,11 @@ bool WindowsTextToSpeechManager::resume() { bool WindowsTextToSpeechManager::isSpeaking() { if(_speechState == BROKEN || _speechState == NO_VOICE) return false; - SPVOICESTATUS eventStatus; - _voice->GetStatus(&eventStatus, NULL); - return eventStatus.dwRunningState == SPRS_IS_SPEAKING; + SPAUDIOSTATUS audioStatus; + SPVOICESTATUS voiceStatus; + _audio->GetStatus(&audioStatus); + _voice->GetStatus(&voiceStatus, NULL); + return audioStatus.State != SPAS_CLOSED || voiceStatus.dwRunningState != SPRS_DONE; } bool WindowsTextToSpeechManager::isPaused() { |