Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
43220a60
Commit
43220a60
authored
Mar 01, 2024
by
Shaun Ren
Committed by
Alexandre Julliard
Mar 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Implement ISpeechVoice::{get/putref}_Voice.
parent
7c384f36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
5 deletions
+43
-5
tts.c
dlls/sapi/tests/tts.c
+21
-1
tts.c
dlls/sapi/tts.c
+22
-4
No files found.
dlls/sapi/tests/tts.c
View file @
43220a60
...
...
@@ -424,7 +424,7 @@ static void test_spvoice(void)
IUnknown
*
dummy
;
ISpMMSysAudio
*
audio_out
;
ISpObjectTokenCategory
*
token_cat
;
ISpObjectToken
*
token
;
ISpObjectToken
*
token
,
*
token2
;
WCHAR
*
token_id
=
NULL
,
*
default_token_id
=
NULL
;
ISpDataKey
*
attrs_key
;
LONG
rate
;
...
...
@@ -435,6 +435,7 @@ static void test_spvoice(void)
ISpeechVoice
*
speech_voice
;
ISpeechObjectTokens
*
speech_tokens
;
LONG
count
,
volume_long
;
ISpeechObjectToken
*
speech_token
;
BSTR
req
=
NULL
,
opt
=
NULL
;
UINT
info_count
;
ITypeInfo
*
typeinfo
;
...
...
@@ -724,6 +725,25 @@ static void test_spvoice(void)
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
volume_long
==
80
,
"got %ld.
\n
"
,
volume_long
);
hr
=
ISpObjectToken_QueryInterface
(
token
,
&
IID_ISpeechObjectToken
,
(
void
**
)
&
speech_token
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
hr
=
ISpeechVoice_putref_Voice
(
speech_voice
,
speech_token
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ISpeechObjectToken_Release
(
speech_token
);
speech_token
=
(
ISpeechObjectToken
*
)
0xdeadbeef
;
hr
=
ISpeechVoice_get_Voice
(
speech_voice
,
&
speech_token
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
speech_token
&&
speech_token
!=
(
ISpeechObjectToken
*
)
0xdeadbeef
,
"got %p.
\n
"
,
speech_token
);
hr
=
ISpeechObjectToken_QueryInterface
(
speech_token
,
&
IID_ISpObjectToken
,
(
void
**
)
&
token2
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
token_id
=
NULL
;
hr
=
ISpObjectToken_GetId
(
token2
,
&
token_id
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
!
wcscmp
(
token_id
,
test_token_id
),
"got %s.
\n
"
,
wine_dbgstr_w
(
token_id
));
CoTaskMemFree
(
token_id
);
ISpObjectToken_Release
(
token2
);
hr
=
ISpeechVoice_Speak
(
speech_voice
,
NULL
,
SVSFPurgeBeforeSpeak
,
NULL
);
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
...
...
dlls/sapi/tts.c
View file @
43220a60
...
...
@@ -235,16 +235,34 @@ static HRESULT WINAPI speech_voice_get_Status(ISpeechVoice *iface, ISpeechVoiceS
static
HRESULT
WINAPI
speech_voice_get_Voice
(
ISpeechVoice
*
iface
,
ISpeechObjectToken
**
voice
)
{
FIXME
(
"(%p, %p): stub.
\n
"
,
iface
,
voice
);
struct
speech_voice
*
This
=
impl_from_ISpeechVoice
(
iface
);
ISpObjectToken
*
token
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"(%p, %p).
\n
"
,
iface
,
voice
);
if
(
!
voice
)
return
E_POINTER
;
if
(
FAILED
(
hr
=
ISpVoice_GetVoice
(
&
This
->
ISpVoice_iface
,
&
token
)))
return
hr
;
hr
=
ISpObjectToken_QueryInterface
(
token
,
&
IID_ISpeechObjectToken
,
(
void
**
)
voice
);
ISpObjectToken_Release
(
token
);
return
hr
;
}
static
HRESULT
WINAPI
speech_voice_putref_Voice
(
ISpeechVoice
*
iface
,
ISpeechObjectToken
*
voice
)
{
FIXME
(
"(%p, %p): stub.
\n
"
,
iface
,
voice
);
struct
speech_voice
*
This
=
impl_from_ISpeechVoice
(
iface
);
ISpObjectToken
*
token
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"(%p, %p).
\n
"
,
iface
,
voice
);
if
(
!
voice
)
return
E_INVALIDARG
;
if
(
FAILED
(
hr
=
ISpeechObjectToken_QueryInterface
(
voice
,
&
IID_ISpObjectToken
,
(
void
**
)
&
token
)))
return
hr
;
hr
=
ISpVoice_SetVoice
(
&
This
->
ISpVoice_iface
,
token
);
ISpObjectToken_Release
(
token
);
return
hr
;
}
static
HRESULT
WINAPI
speech_voice_get_AudioOutput
(
ISpeechVoice
*
iface
,
ISpeechObjectToken
**
output
)
...
...
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