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
77428d02
Commit
77428d02
authored
Apr 29, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
May 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepulse: Use mmdevapi's SimpleAudioVolume.
parent
04c909ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
129 deletions
+1
-129
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+1
-129
No files found.
dlls/winepulse.drv/mmdevdrv.c
View file @
77428d02
...
...
@@ -128,7 +128,7 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl;
static
const
IAudioRenderClientVtbl
AudioRenderClient_Vtbl
;
static
const
IAudioCaptureClientVtbl
AudioCaptureClient_Vtbl
;
extern
const
IAudioSessionControl2Vtbl
AudioSessionControl2_Vtbl
;
static
const
ISimpleAudioVolumeVtbl
SimpleAudioVolume_Vtbl
;
extern
const
ISimpleAudioVolumeVtbl
SimpleAudioVolume_Vtbl
;
static
const
IChannelAudioVolumeVtbl
ChannelAudioVolume_Vtbl
;
static
const
IAudioClockVtbl
AudioClock_Vtbl
;
static
const
IAudioClock2Vtbl
AudioClock2_Vtbl
;
...
...
@@ -151,11 +151,6 @@ static inline ACImpl *impl_from_IAudioCaptureClient(IAudioCaptureClient *iface)
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioCaptureClient_iface
);
}
static
inline
AudioSessionWrapper
*
impl_from_ISimpleAudioVolume
(
ISimpleAudioVolume
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
AudioSessionWrapper
,
ISimpleAudioVolume_iface
);
}
static
inline
AudioSessionWrapper
*
impl_from_IChannelAudioVolume
(
IChannelAudioVolume
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
AudioSessionWrapper
,
IChannelAudioVolume_iface
);
...
...
@@ -1887,129 +1882,6 @@ static AudioSessionWrapper *AudioSessionWrapper_Create(ACImpl *client)
return
ret
;
}
static
HRESULT
WINAPI
SimpleAudioVolume_QueryInterface
(
ISimpleAudioVolume
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
return
E_POINTER
;
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_ISimpleAudioVolume
))
*
ppv
=
iface
;
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
WARN
(
"Unknown interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
SimpleAudioVolume_AddRef
(
ISimpleAudioVolume
*
iface
)
{
AudioSessionWrapper
*
This
=
impl_from_ISimpleAudioVolume
(
iface
);
return
IAudioSessionControl2_AddRef
(
&
This
->
IAudioSessionControl2_iface
);
}
static
ULONG
WINAPI
SimpleAudioVolume_Release
(
ISimpleAudioVolume
*
iface
)
{
AudioSessionWrapper
*
This
=
impl_from_ISimpleAudioVolume
(
iface
);
return
IAudioSessionControl2_Release
(
&
This
->
IAudioSessionControl2_iface
);
}
static
HRESULT
WINAPI
SimpleAudioVolume_SetMasterVolume
(
ISimpleAudioVolume
*
iface
,
float
level
,
const
GUID
*
context
)
{
AudioSessionWrapper
*
This
=
impl_from_ISimpleAudioVolume
(
iface
);
AudioSession
*
session
=
This
->
session
;
ACImpl
*
client
;
TRACE
(
"(%p)->(%f, %s)
\n
"
,
session
,
level
,
wine_dbgstr_guid
(
context
));
if
(
level
<
0
.
f
||
level
>
1
.
f
)
return
E_INVALIDARG
;
if
(
context
)
FIXME
(
"Notifications not supported yet
\n
"
);
TRACE
(
"PulseAudio does not support session volume control
\n
"
);
sessions_lock
();
session
->
master_vol
=
level
;
LIST_FOR_EACH_ENTRY
(
client
,
&
This
->
session
->
clients
,
ACImpl
,
entry
)
set_stream_volumes
(
client
);
sessions_unlock
();
return
S_OK
;
}
static
HRESULT
WINAPI
SimpleAudioVolume_GetMasterVolume
(
ISimpleAudioVolume
*
iface
,
float
*
level
)
{
AudioSessionWrapper
*
This
=
impl_from_ISimpleAudioVolume
(
iface
);
AudioSession
*
session
=
This
->
session
;
TRACE
(
"(%p)->(%p)
\n
"
,
session
,
level
);
if
(
!
level
)
return
NULL_PTR_ERR
;
*
level
=
session
->
master_vol
;
return
S_OK
;
}
static
HRESULT
WINAPI
SimpleAudioVolume_SetMute
(
ISimpleAudioVolume
*
iface
,
BOOL
mute
,
const
GUID
*
context
)
{
AudioSessionWrapper
*
This
=
impl_from_ISimpleAudioVolume
(
iface
);
AudioSession
*
session
=
This
->
session
;
ACImpl
*
client
;
TRACE
(
"(%p)->(%u, %s)
\n
"
,
session
,
mute
,
debugstr_guid
(
context
));
if
(
context
)
FIXME
(
"Notifications not supported yet
\n
"
);
sessions_lock
();
session
->
mute
=
mute
;
LIST_FOR_EACH_ENTRY
(
client
,
&
This
->
session
->
clients
,
ACImpl
,
entry
)
set_stream_volumes
(
client
);
sessions_unlock
();
return
S_OK
;
}
static
HRESULT
WINAPI
SimpleAudioVolume_GetMute
(
ISimpleAudioVolume
*
iface
,
BOOL
*
mute
)
{
AudioSessionWrapper
*
This
=
impl_from_ISimpleAudioVolume
(
iface
);
AudioSession
*
session
=
This
->
session
;
TRACE
(
"(%p)->(%p)
\n
"
,
session
,
mute
);
if
(
!
mute
)
return
NULL_PTR_ERR
;
*
mute
=
session
->
mute
;
return
S_OK
;
}
static
const
ISimpleAudioVolumeVtbl
SimpleAudioVolume_Vtbl
=
{
SimpleAudioVolume_QueryInterface
,
SimpleAudioVolume_AddRef
,
SimpleAudioVolume_Release
,
SimpleAudioVolume_SetMasterVolume
,
SimpleAudioVolume_GetMasterVolume
,
SimpleAudioVolume_SetMute
,
SimpleAudioVolume_GetMute
};
static
HRESULT
WINAPI
ChannelAudioVolume_QueryInterface
(
IChannelAudioVolume
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
...
...
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