Commit 4e88f093 authored by Bernhard Kölbl's avatar Bernhard Kölbl Committed by Alexandre Julliard

windows.media.speech: Return IAsyncAction from session_PauseAsync.

parent d21b872a
......@@ -283,10 +283,15 @@ static HRESULT WINAPI session_CancelAsync( ISpeechContinuousRecognitionSession *
return E_NOTIMPL;
}
static HRESULT session_pause_async( IInspectable *invoker )
{
return S_OK;
}
static HRESULT WINAPI session_PauseAsync( ISpeechContinuousRecognitionSession *iface, IAsyncAction **action )
{
FIXME("iface %p, action %p stub!\n", iface, action);
return E_NOTIMPL;
return async_action_create(NULL, session_pause_async, action);
}
static HRESULT WINAPI session_Resume( ISpeechContinuousRecognitionSession *iface )
......
......@@ -1761,6 +1761,15 @@ static void test_Recognition(void)
* TODO: Use a loopback device together with prerecorded audio files to test the recognizer's functionality.
*/
hr = ISpeechContinuousRecognitionSession_PauseAsync(session, &action2);
ok(hr == S_OK, "ISpeechContinuousRecognitionSession_PauseAsync failed, hr %#lx.\n", hr);
await_async_void(action2, &action_handler);
check_async_info((IInspectable *)action2, 3, Completed, S_OK);
IAsyncAction_Release(action2);
hr = ISpeechContinuousRecognitionSession_Resume(session);
todo_wine ok(hr == S_OK, "ISpeechContinuousRecognitionSession_Resume failed, hr %#lx.\n", hr);
hr = ISpeechContinuousRecognitionSession_StopAsync(session, &action2);
ok(hr == S_OK, "ISpeechContinuousRecognitionSession_StopAsync failed, hr %#lx.\n", hr);
......@@ -1792,7 +1801,7 @@ static void test_Recognition(void)
hr = IAsyncInfo_Close(info); /* If IAsyncInfo_Close would wait for the handler to finish, the test would get stuck here. */
ok(hr == S_OK, "IAsyncInfo_Close failed, hr %#lx.\n", hr);
check_async_info((IInspectable *)action2, 3, AsyncStatus_Closed, S_OK);
check_async_info((IInspectable *)action2, 4, AsyncStatus_Closed, S_OK);
set = SetEvent(action_handler.event_block);
ok(set == TRUE, "Event 'event_block' wasn't set.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment