windows.media.speech: Implement ISpeechRecognizer2_get_ContinuousRecognitionSession.
Signed-off-by: Bernhard Kölbl <besentv@gmail.com> Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a03a4ee60e
commit
0ff960b737
|
@ -443,8 +443,10 @@ DEFINE_IINSPECTABLE(recognizer2, ISpeechRecognizer2, struct recognizer, ISpeechR
|
|||
static HRESULT WINAPI recognizer2_get_ContinuousRecognitionSession( ISpeechRecognizer2 *iface,
|
||||
ISpeechContinuousRecognitionSession **session )
|
||||
{
|
||||
FIXME("iface %p, session %p stub!\n", iface, session);
|
||||
return E_NOTIMPL;
|
||||
struct recognizer *impl = impl_from_ISpeechRecognizer2(iface);
|
||||
TRACE("iface %p, session %p.\n", iface, session);
|
||||
ISpeechContinuousRecognitionSession_QueryInterface(impl->session, &IID_ISpeechContinuousRecognitionSession, (void **)session);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI recognizer2_get_State( ISpeechRecognizer2 *iface, SpeechRecognizerState *state )
|
||||
|
|
|
@ -569,6 +569,7 @@ static void test_VoiceInformation(void)
|
|||
static void test_SpeechRecognizer(void)
|
||||
{
|
||||
static const WCHAR *speech_recognition_name = L"Windows.Media.SpeechRecognition.SpeechRecognizer";
|
||||
ISpeechContinuousRecognitionSession *session = NULL;
|
||||
ISpeechRecognizerFactory *sr_factory = NULL;
|
||||
ISpeechRecognizerStatics *sr_statics = NULL;
|
||||
ISpeechRecognizerStatics2 *sr_statics2 = NULL;
|
||||
|
@ -648,6 +649,14 @@ static void test_SpeechRecognizer(void)
|
|||
hr = IInspectable_QueryInterface(inspectable, &IID_ISpeechRecognizer2, (void **)&recognizer2);
|
||||
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
|
||||
hr = ISpeechRecognizer2_get_ContinuousRecognitionSession(recognizer2, &session);
|
||||
ok(hr == S_OK, "ISpeechRecognizer2_get_ContinuousRecognitionSession failed, hr %#lx.\n", hr);
|
||||
check_refcount(session, 2);
|
||||
check_refcount(inspectable, 3);
|
||||
|
||||
ref = ISpeechContinuousRecognitionSession_Release(session);
|
||||
ok(ref == 1, "Got unexpected ref %lu.\n", ref);
|
||||
|
||||
hr = IInspectable_QueryInterface(inspectable, &IID_IClosable, (void **)&closable);
|
||||
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue