windows.media.speech: Implement ISpeechRecognizer_get_Constraints.
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
3366fecc3c
commit
1f35e2fe4f
|
@ -324,8 +324,10 @@ static HRESULT WINAPI recognizer_GetTrustLevel( ISpeechRecognizer *iface, TrustL
|
||||||
|
|
||||||
static HRESULT WINAPI recognizer_get_Constraints( ISpeechRecognizer *iface, IVector_ISpeechRecognitionConstraint **vector )
|
static HRESULT WINAPI recognizer_get_Constraints( ISpeechRecognizer *iface, IVector_ISpeechRecognitionConstraint **vector )
|
||||||
{
|
{
|
||||||
FIXME("iface %p, operation %p stub!\n", iface, vector);
|
struct recognizer *impl = impl_from_ISpeechRecognizer(iface);
|
||||||
return E_NOTIMPL;
|
TRACE("iface %p, operation %p.\n", iface, vector);
|
||||||
|
IVector_ISpeechRecognitionConstraint_AddRef((*vector = impl->constraints));
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI recognizer_get_CurrentLanguage( ISpeechRecognizer *iface, ILanguage **language )
|
static HRESULT WINAPI recognizer_get_CurrentLanguage( ISpeechRecognizer *iface, ILanguage **language )
|
||||||
|
|
|
@ -729,6 +729,7 @@ static void test_VoiceInformation(void)
|
||||||
static void test_SpeechRecognizer(void)
|
static void test_SpeechRecognizer(void)
|
||||||
{
|
{
|
||||||
static const WCHAR *speech_recognition_name = L"Windows.Media.SpeechRecognition.SpeechRecognizer";
|
static const WCHAR *speech_recognition_name = L"Windows.Media.SpeechRecognition.SpeechRecognizer";
|
||||||
|
IVector_ISpeechRecognitionConstraint *constraints = NULL;
|
||||||
ISpeechContinuousRecognitionSession *session = NULL;
|
ISpeechContinuousRecognitionSession *session = NULL;
|
||||||
ISpeechRecognizerFactory *sr_factory = NULL;
|
ISpeechRecognizerFactory *sr_factory = NULL;
|
||||||
ISpeechRecognizerStatics *sr_statics = NULL;
|
ISpeechRecognizerStatics *sr_statics = NULL;
|
||||||
|
@ -841,6 +842,12 @@ static void test_SpeechRecognizer(void)
|
||||||
hr = ISpeechContinuousRecognitionSession_remove_ResultGenerated(session, token);
|
hr = ISpeechContinuousRecognitionSession_remove_ResultGenerated(session, token);
|
||||||
ok(hr == S_OK, "ISpeechContinuousRecognitionSession_remove_ResultGenerated failed, hr %#lx.\n", hr);
|
ok(hr == S_OK, "ISpeechContinuousRecognitionSession_remove_ResultGenerated failed, hr %#lx.\n", hr);
|
||||||
|
|
||||||
|
hr = ISpeechRecognizer_get_Constraints(recognizer, &constraints);
|
||||||
|
ok(hr == S_OK, "ISpeechContinuousRecognitionSession_get_Constraints failed, hr %#lx.\n", hr);
|
||||||
|
|
||||||
|
ref = IVector_ISpeechRecognitionConstraint_Release(constraints);
|
||||||
|
ok(ref == 1, "Got unexpected ref %lu.\n", ref);
|
||||||
|
|
||||||
ref = ISpeechContinuousRecognitionSession_Release(session);
|
ref = ISpeechContinuousRecognitionSession_Release(session);
|
||||||
ok(ref == 1, "Got unexpected ref %lu.\n", ref);
|
ok(ref == 1, "Got unexpected ref %lu.\n", ref);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue