Index: chrome/browser/extensions/extension_tts_api_win.cc |
=================================================================== |
--- chrome/browser/extensions/extension_tts_api_win.cc (revision 72316) |
+++ chrome/browser/extensions/extension_tts_api_win.cc (working copy) |
@@ -94,7 +94,7 @@ |
} |
bool ExtensionTtsPlatformImplWin::StopSpeaking() { |
- if (!speech_synthesizer_ && !paused_) { |
+ if (speech_synthesizer_ && !paused_) { |
speech_synthesizer_->Pause(); |
paused_ = true; |
} |
@@ -102,6 +102,12 @@ |
} |
bool ExtensionTtsPlatformImplWin::IsSpeaking() { |
+ if (speech_synthesizer_ && !paused_) { |
+ SPVOICESTATUS status; |
+ HRESULT result = speech_synthesizer_->GetStatus(&status, NULL); |
+ if (result == S_OK && status.dwRunningState == SPRS_IS_SPEAKING) |
+ return true; |
+ } |
return false; |
} |