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
231e4512
Commit
231e4512
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: Always initialize ref to 1 in session wrapper.
parent
76acd591
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+16
-8
No files found.
dlls/winepulse.drv/mmdevdrv.c
View file @
231e4512
...
...
@@ -1037,38 +1037,46 @@ static HRESULT WINAPI AudioClient_GetService(IAudioClient3 *iface, REFIID riid,
if
(
IsEqualIID
(
riid
,
&
IID_IAudioRenderClient
))
{
if
(
This
->
dataflow
!=
eRender
)
return
AUDCLNT_E_WRONG_ENDPOINT_TYPE
;
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
;
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
)
||
IsEqualIID
(
riid
,
&
IID_IChannelAudioVolume
)
||
IsEqualIID
(
riid
,
&
IID_ISimpleAudioVolume
))
{
if
(
!
This
->
session_wrapper
)
{
const
BOOLEAN
new_session
=
!
This
->
session_wrapper
;
if
(
new_session
)
{
This
->
session_wrapper
=
AudioSessionWrapper_Create
(
This
);
if
(
!
This
->
session_wrapper
)
return
E_OUTOFMEMORY
;
}
if
(
IsEqualIID
(
riid
,
&
IID_IAudioSessionControl
))
*
ppv
=
&
This
->
session_wrapper
->
IAudioSessionControl2_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IChannelAudioVolume
))
*
ppv
=
&
This
->
session_wrapper
->
IChannelAudioVolume_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_ISimpleAudioVolume
))
*
ppv
=
&
This
->
session_wrapper
->
ISimpleAudioVolume_iface
;
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
if
(
!
new_session
)
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
}
else
{
FIXME
(
"stub %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
FIXME
(
"stub %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
return
S_OK
;
}
extern
HRESULT
WINAPI
client_IsOffloadCapable
(
IAudioClient3
*
iface
,
...
...
@@ -1130,7 +1138,7 @@ static AudioSessionWrapper *AudioSessionWrapper_Create(ACImpl *client)
ret
->
ISimpleAudioVolume_iface
.
lpVtbl
=
&
SimpleAudioVolume_Vtbl
;
ret
->
IChannelAudioVolume_iface
.
lpVtbl
=
&
ChannelAudioVolume_Vtbl
;
ret
->
ref
=
!
client
;
ret
->
ref
=
1
;
ret
->
client
=
client
;
if
(
client
)
{
...
...
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