|
@@ -76,7 +76,7 @@ bool TtsPlatformImplWin::Speak(
|
|
|
std::wstring prefix;
|
|
|
std::wstring suffix;
|
|
|
|
|
|
- if (!speech_synthesizer_.get())
|
|
|
+ if (!speech_synthesizer_.Get())
|
|
|
return false;
|
|
|
|
|
|
// TODO(dmazzoni): support languages other than the default: crbug.com/88059
|
|
@@ -121,7 +121,7 @@ bool TtsPlatformImplWin::Speak(
|
|
|
}
|
|
|
|
|
|
bool TtsPlatformImplWin::StopSpeaking() {
|
|
|
- if (speech_synthesizer_.get()) {
|
|
|
+ if (speech_synthesizer_.Get()) {
|
|
|
// Clear the stream number so that any further events relating to this
|
|
|
// utterance are ignored.
|
|
|
stream_number_ = 0;
|
|
@@ -139,7 +139,7 @@ bool TtsPlatformImplWin::StopSpeaking() {
|
|
|
}
|
|
|
|
|
|
void TtsPlatformImplWin::Pause() {
|
|
|
- if (speech_synthesizer_.get() && utterance_id_ && !paused_) {
|
|
|
+ if (speech_synthesizer_.Get() && utterance_id_ && !paused_) {
|
|
|
speech_synthesizer_->Pause();
|
|
|
paused_ = true;
|
|
|
TtsController::GetInstance()->OnTtsEvent(
|
|
@@ -148,7 +148,7 @@ void TtsPlatformImplWin::Pause() {
|
|
|
}
|
|
|
|
|
|
void TtsPlatformImplWin::Resume() {
|
|
|
- if (speech_synthesizer_.get() && utterance_id_ && paused_) {
|
|
|
+ if (speech_synthesizer_.Get() && utterance_id_ && paused_) {
|
|
|
speech_synthesizer_->Resume();
|
|
|
paused_ = false;
|
|
|
TtsController::GetInstance()->OnTtsEvent(
|
|
@@ -157,7 +157,7 @@ void TtsPlatformImplWin::Resume() {
|
|
|
}
|
|
|
|
|
|
bool TtsPlatformImplWin::IsSpeaking() {
|
|
|
- if (speech_synthesizer_.get()) {
|
|
|
+ if (speech_synthesizer_.Get()) {
|
|
|
SPVOICESTATUS status;
|
|
|
HRESULT result = speech_synthesizer_->GetStatus(&status, NULL);
|
|
|
if (result == S_OK) {
|
|
@@ -233,7 +233,7 @@ TtsPlatformImplWin::TtsPlatformImplWin()
|
|
|
char_position_(0),
|
|
|
paused_(false) {
|
|
|
speech_synthesizer_.CreateInstance(CLSID_SpVoice);
|
|
|
- if (speech_synthesizer_.get()) {
|
|
|
+ if (speech_synthesizer_.Get()) {
|
|
|
ULONGLONG event_mask =
|
|
|
SPFEI(SPEI_START_INPUT_STREAM) |
|
|
|
SPFEI(SPEI_TTS_BOOKMARK) |
|