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
aa9a69f8
Commit
aa9a69f8
authored
Jun 06, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Jun 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepulse: Lock sessions in AudioClient's GetService.
parent
d94ac14e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+26
-10
No files found.
dlls/winepulse.drv/mmdevdrv.c
View file @
aa9a69f8
...
...
@@ -1025,6 +1025,7 @@ 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
);
...
...
@@ -1032,18 +1033,26 @@ static HRESULT WINAPI AudioClient_GetService(IAudioClient3 *iface, REFIID riid,
return
E_POINTER
;
*
ppv
=
NULL
;
if
(
!
This
->
stream
)
return
AUDCLNT_E_NOT_INITIALIZED
;
sessions_lock
();
if
(
!
This
->
stream
)
{
hr
=
AUDCLNT_E_NOT_INITIALIZED
;
goto
exit
;
}
if
(
IsEqualIID
(
riid
,
&
IID_IAudioRenderClient
))
{
if
(
This
->
dataflow
!=
eRender
)
return
AUDCLNT_E_WRONG_ENDPOINT_TYPE
;
if
(
This
->
dataflow
!=
eRender
)
{
hr
=
AUDCLNT_E_WRONG_ENDPOINT_TYPE
;
goto
exit
;
}
IAudioRenderClient_AddRef
(
&
This
->
IAudioRenderClient_iface
);
*
ppv
=
&
This
->
IAudioRenderClient_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IAudioCaptureClient
))
{
if
(
This
->
dataflow
!=
eCapture
)
return
AUDCLNT_E_WRONG_ENDPOINT_TYPE
;
if
(
This
->
dataflow
!=
eCapture
)
{
hr
=
AUDCLNT_E_WRONG_ENDPOINT_TYPE
;
goto
exit
;
}
IAudioCaptureClient_AddRef
(
&
This
->
IAudioCaptureClient_iface
);
*
ppv
=
&
This
->
IAudioCaptureClient_iface
;
...
...
@@ -1059,8 +1068,10 @@ static HRESULT WINAPI AudioClient_GetService(IAudioClient3 *iface, REFIID riid,
const
BOOLEAN
new_session
=
!
This
->
session_wrapper
;
if
(
new_session
)
{
This
->
session_wrapper
=
session_wrapper_create
(
This
);
if
(
!
This
->
session_wrapper
)
return
E_OUTOFMEMORY
;
if
(
!
This
->
session_wrapper
)
{
hr
=
E_OUTOFMEMORY
;
goto
exit
;
}
}
if
(
IsEqualIID
(
riid
,
&
IID_IAudioSessionControl
))
...
...
@@ -1074,10 +1085,15 @@ static HRESULT WINAPI AudioClient_GetService(IAudioClient3 *iface, REFIID riid,
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
}
else
{
FIXME
(
"stub %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
hr
=
E_NOINTERFACE
;
goto
exit
;
}
return
S_OK
;
hr
=
S_OK
;
exit:
sessions_unlock
();
return
hr
;
}
extern
HRESULT
WINAPI
client_IsOffloadCapable
(
IAudioClient3
*
iface
,
...
...
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