mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/...
https://codereview.chromium.org/2894483002
This commit is contained in:
committed by
Cheng Zhao
parent
79e59a88b4
commit
7f5fbb04e2
@@ -3,6 +3,7 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <math.h>
|
||||
#include <objbase.h>
|
||||
#include <sapi.h>
|
||||
|
||||
#include "base/memory/singleton.h"
|
||||
@@ -232,7 +233,8 @@ TtsPlatformImplWin::TtsPlatformImplWin()
|
||||
stream_number_(0),
|
||||
char_position_(0),
|
||||
paused_(false) {
|
||||
speech_synthesizer_.CreateInstance(CLSID_SpVoice);
|
||||
::CoCreateInstance(CLSID_SpVoice, nullptr, CLSCTX_ALL,
|
||||
IID_PPV_ARGS(&speech_synthesizer_));
|
||||
if (speech_synthesizer_.Get()) {
|
||||
ULONGLONG event_mask =
|
||||
SPFEI(SPEI_START_INPUT_STREAM) |
|
||||
|
||||
Reference in New Issue
Block a user