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
adfc7cef
Commit
adfc7cef
authored
May 25, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Jun 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Use mmdevapi's AudioClient's GetService.
parent
09b24317
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
83 deletions
+3
-83
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+3
-83
No files found.
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
adfc7cef
...
...
@@ -861,88 +861,8 @@ static HRESULT WINAPI AudioClient_SetEventHandle(IAudioClient3 *iface,
return
params
.
result
;
}
static
HRESULT
WINAPI
AudioClient_GetService
(
IAudioClient3
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
ACImpl
*
This
=
impl_from_IAudioClient3
(
iface
);
HRESULT
hr
;
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
return
E_POINTER
;
*
ppv
=
NULL
;
if
(
!
This
->
stream
)
return
AUDCLNT_E_NOT_INITIALIZED
;
sessions_lock
();
if
(
IsEqualIID
(
riid
,
&
IID_IAudioRenderClient
)){
if
(
This
->
dataflow
!=
eRender
){
hr
=
AUDCLNT_E_WRONG_ENDPOINT_TYPE
;
goto
end
;
}
IAudioRenderClient_AddRef
(
&
This
->
IAudioRenderClient_iface
);
*
ppv
=
&
This
->
IAudioRenderClient_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IAudioCaptureClient
)){
if
(
This
->
dataflow
!=
eCapture
){
hr
=
AUDCLNT_E_WRONG_ENDPOINT_TYPE
;
goto
end
;
}
IAudioCaptureClient_AddRef
(
&
This
->
IAudioCaptureClient_iface
);
*
ppv
=
&
This
->
IAudioCaptureClient_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IAudioClock
)){
IAudioClock_AddRef
(
&
This
->
IAudioClock_iface
);
*
ppv
=
&
This
->
IAudioClock_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IAudioStreamVolume
)){
IAudioStreamVolume_AddRef
(
&
This
->
IAudioStreamVolume_iface
);
*
ppv
=
&
This
->
IAudioStreamVolume_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IAudioSessionControl
)){
if
(
!
This
->
session_wrapper
){
This
->
session_wrapper
=
session_wrapper_create
(
This
);
if
(
!
This
->
session_wrapper
){
hr
=
E_OUTOFMEMORY
;
goto
end
;
}
}
else
IAudioSessionControl2_AddRef
(
&
This
->
session_wrapper
->
IAudioSessionControl2_iface
);
*
ppv
=
&
This
->
session_wrapper
->
IAudioSessionControl2_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IChannelAudioVolume
)){
if
(
!
This
->
session_wrapper
){
This
->
session_wrapper
=
session_wrapper_create
(
This
);
if
(
!
This
->
session_wrapper
){
hr
=
E_OUTOFMEMORY
;
goto
end
;
}
}
else
IChannelAudioVolume_AddRef
(
&
This
->
session_wrapper
->
IChannelAudioVolume_iface
);
*
ppv
=
&
This
->
session_wrapper
->
IChannelAudioVolume_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_ISimpleAudioVolume
)){
if
(
!
This
->
session_wrapper
){
This
->
session_wrapper
=
session_wrapper_create
(
This
);
if
(
!
This
->
session_wrapper
){
hr
=
E_OUTOFMEMORY
;
goto
end
;
}
}
else
ISimpleAudioVolume_AddRef
(
&
This
->
session_wrapper
->
ISimpleAudioVolume_iface
);
*
ppv
=
&
This
->
session_wrapper
->
ISimpleAudioVolume_iface
;
}
if
(
*
ppv
)
hr
=
S_OK
;
else
{
FIXME
(
"stub %s
\n
"
,
debugstr_guid
(
riid
));
hr
=
E_NOINTERFACE
;
}
end:
sessions_unlock
();
return
hr
;
}
extern
HRESULT
WINAPI
client_GetService
(
IAudioClient3
*
iface
,
REFIID
riid
,
void
**
ppv
);
extern
HRESULT
WINAPI
client_IsOffloadCapable
(
IAudioClient3
*
iface
,
AUDIO_STREAM_CATEGORY
category
,
BOOL
*
offload_capable
);
...
...
@@ -981,7 +901,7 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl =
AudioClient_Stop
,
AudioClient_Reset
,
AudioClient_SetEventHandle
,
AudioC
lient_GetService
,
c
lient_GetService
,
client_IsOffloadCapable
,
client_SetClientProperties
,
client_GetBufferSizeLimits
,
...
...
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