Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d21b872a
Commit
d21b872a
authored
May 03, 2022
by
Bernhard Kölbl
Committed by
Alexandre Julliard
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.speech: Return IAsyncAction from session_StopAsync.
Signed-off-by:
Bernhard Kölbl
<
besentv@gmail.com
>
parent
754452dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
recognizer.c
dlls/windows.media.speech/recognizer.c
+6
-1
speech.c
dlls/windows.media.speech/tests/speech.c
+10
-14
No files found.
dlls/windows.media.speech/recognizer.c
View file @
d21b872a
...
...
@@ -266,10 +266,15 @@ static HRESULT WINAPI session_StartWithModeAsync( ISpeechContinuousRecognitionSe
return
E_NOTIMPL
;
}
static
HRESULT
session_stop_async
(
IInspectable
*
invoker
)
{
return
S_OK
;
}
static
HRESULT
WINAPI
session_StopAsync
(
ISpeechContinuousRecognitionSession
*
iface
,
IAsyncAction
**
action
)
{
FIXME
(
"iface %p, action %p stub!
\n
"
,
iface
,
action
);
return
E_NOTIMPL
;
return
async_action_create
(
NULL
,
session_stop_async
,
action
)
;
}
static
HRESULT
WINAPI
session_CancelAsync
(
ISpeechContinuousRecognitionSession
*
iface
,
IAsyncAction
**
action
)
...
...
dlls/windows.media.speech/tests/speech.c
View file @
d21b872a
...
...
@@ -1762,9 +1762,7 @@ static void test_Recognition(void)
*/
hr
=
ISpeechContinuousRecognitionSession_StopAsync
(
session
,
&
action2
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_StopAsync failed, hr %#lx.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
skip_action
;
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_StopAsync failed, hr %#lx.
\n
"
,
hr
);
async_void_handler_create_static
(
&
action_handler
);
action_handler
.
event_block
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
...
...
@@ -1776,40 +1774,38 @@ static void test_Recognition(void)
put_param
.
handler
=
&
action_handler
.
IAsyncActionCompletedHandler_iface
;
put_param
.
action
=
action2
;
put_thread
=
CreateThread
(
NULL
,
0
,
action_put_completed_thread
,
&
put_param
,
0
,
NULL
);
todo_wine
ok
(
!
WaitForSingleObject
(
action_handler
.
event_finished
,
5000
),
"Wait for event_finished failed.
\n
"
);
ok
(
!
WaitForSingleObject
(
action_handler
.
event_finished
,
5000
),
"Wait for event_finished failed.
\n
"
);
handler
=
(
void
*
)
0xdeadbeef
;
old_ref
=
action_handler
.
ref
;
hr
=
IAsyncAction_get_Completed
(
action2
,
&
handler
);
todo_wine
ok
(
hr
==
S_OK
,
"IAsyncAction_get_Completed failed, hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IAsyncAction_get_Completed failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
handler
==
&
action_handler
.
IAsyncActionCompletedHandler_iface
||
/* Broken on 1507. */
broken
(
handler
!=
NULL
&&
handler
!=
(
void
*
)
0xdeadbeef
),
"Handler was %p.
\n
"
,
handler
);
todo_wine
ok
(
handler
==
&
action_handler
.
IAsyncActionCompletedHandler_iface
,
"Handler was %p.
\n
"
,
handler
);
ref
=
action_handler
.
ref
-
old_ref
;
todo_wine
ok
(
ref
==
1
,
"The ref was increased by %lu.
\n
"
,
ref
);
IAsyncActionCompletedHandler_Release
(
handler
);
if
(
handler
)
IAsyncActionCompletedHandler_Release
(
handler
);
hr
=
IAsyncAction_QueryInterface
(
action2
,
&
IID_IAsyncInfo
,
(
void
**
)
&
info
);
todo_wine
ok
(
hr
==
S_OK
,
"IAsyncAction_QueryInterface failed, hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IAsyncAction_QueryInterface failed, hr %#lx.
\n
"
,
hr
);
hr
=
IAsyncInfo_Close
(
info
);
/* If IAsyncInfo_Close would wait for the handler to finish, the test would get stuck here. */
todo_wine
ok
(
hr
==
S_OK
,
"IAsyncInfo_Close failed, hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IAsyncInfo_Close failed, hr %#lx.
\n
"
,
hr
);
check_async_info
((
IInspectable
*
)
action2
,
3
,
AsyncStatus_Closed
,
S_OK
);
set
=
SetEvent
(
action_handler
.
event_block
);
todo_wine
ok
(
set
==
TRUE
,
"Event 'event_block' wasn't set.
\n
"
);
todo_wine
ok
(
!
WaitForSingleObject
(
put_thread
,
1000
),
"Wait for put_thread failed.
\n
"
);
ok
(
set
==
TRUE
,
"Event 'event_block' wasn't set.
\n
"
);
ok
(
!
WaitForSingleObject
(
put_thread
,
1000
),
"Wait for put_thread failed.
\n
"
);
IAsyncInfo_Release
(
info
);
CloseHandle
(
action_handler
.
event_finished
);
CloseHandle
(
action_handler
.
event_block
);
CloseHandle
(
put_thread
);
todo_wine
ok
(
action
!=
action2
,
"actions were the same!
\n
"
);
ok
(
action
!=
action2
,
"actions were the same!
\n
"
);
IAsyncAction_Release
(
action2
);
skip_action:
IAsyncAction_Release
(
action
);
hr
=
ISpeechContinuousRecognitionSession_remove_ResultGenerated
(
session
,
token
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment