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
61ad9174
Commit
61ad9174
authored
Jul 20, 2023
by
Shaun Ren
Committed by
Alexandre Julliard
Jul 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Implement ISpVoice::WaitUntilDone.
parent
b89c5361
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
tts.c
dlls/sapi/tests/tts.c
+14
-3
tts.c
dlls/sapi/tts.c
+9
-2
No files found.
dlls/sapi/tests/tts.c
View file @
61ad9174
...
...
@@ -548,6 +548,12 @@ static void test_spvoice(void)
ok
(
stream_num
==
1
,
"got %lu.
\n
"
,
stream_num
);
ok
(
duration
>
800
&&
duration
<
3000
,
"took %lu ms.
\n
"
,
duration
);
start
=
GetTickCount
();
hr
=
ISpVoice_WaitUntilDone
(
voice
,
INFINITE
);
duration
=
GetTickCount
()
-
start
;
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
duration
<
200
,
"took %lu ms.
\n
"
,
duration
);
reset_engine_params
(
&
test_engine
);
stream_num
=
0xdeadbeef
;
start
=
GetTickCount
();
...
...
@@ -557,7 +563,14 @@ static void test_spvoice(void)
todo_wine
ok
(
stream_num
==
1
,
"got %lu.
\n
"
,
stream_num
);
ok
(
duration
<
500
,
"took %lu ms.
\n
"
,
duration
);
Sleep
(
200
);
hr
=
ISpVoice_WaitUntilDone
(
voice
,
100
);
ok
(
hr
==
S_FALSE
,
"got %#lx.
\n
"
,
hr
);
hr
=
ISpVoice_WaitUntilDone
(
voice
,
INFINITE
);
duration
=
GetTickCount
()
-
start
;
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
duration
>
800
&&
duration
<
3000
,
"took %lu ms.
\n
"
,
duration
);
ok
(
test_engine
.
speak_called
,
"ISpTTSEngine::Speak was not called.
\n
"
);
ok
(
test_engine
.
flags
==
SPF_NLP_SPEAK_PUNC
,
"got %#lx.
\n
"
,
test_engine
.
flags
);
ok
(
test_engine
.
frag_list
!=
NULL
,
"frag_list is NULL.
\n
"
);
...
...
@@ -568,8 +581,6 @@ static void test_spvoice(void)
ok
(
test_engine
.
rate
==
0
,
"got %ld.
\n
"
,
test_engine
.
rate
);
ok
(
test_engine
.
volume
==
100
,
"got %d.
\n
"
,
test_engine
.
volume
);
Sleep
(
2000
);
reset_engine_params
(
&
test_engine
);
hr
=
ISpVoice_Speak
(
voice
,
test_text
,
SPF_DEFAULT
|
SPF_ASYNC
,
NULL
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
...
...
dlls/sapi/tts.c
View file @
61ad9174
...
...
@@ -1073,9 +1073,16 @@ static HRESULT WINAPI spvoice_GetVolume(ISpVoice *iface, USHORT *volume)
static
HRESULT
WINAPI
spvoice_WaitUntilDone
(
ISpVoice
*
iface
,
ULONG
timeout
)
{
FIXME
(
"(%p, %ld): stub.
\n
"
,
iface
,
timeout
);
struct
speech_voice
*
This
=
impl_from_ISpVoice
(
iface
);
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"(%p, %ld).
\n
"
,
iface
,
timeout
);
hr
=
async_wait_queue_empty
(
&
This
->
queue
,
timeout
);
if
(
hr
==
WAIT_OBJECT_0
)
return
S_OK
;
else
if
(
hr
==
WAIT_TIMEOUT
)
return
S_FALSE
;
return
hr
;
}
static
HRESULT
WINAPI
spvoice_SetSyncSpeakTimeout
(
ISpVoice
*
iface
,
ULONG
timeout
)
...
...
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