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
620cfe7e
Commit
620cfe7e
authored
Mar 09, 2016
by
Andrew Eikum
Committed by
Alexandre Julliard
Mar 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Implement Set/GetMute.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
982d005d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
audiovolume.c
dlls/mmdevapi/audiovolume.c
+17
-4
render.c
dlls/mmdevapi/tests/render.c
+7
-0
No files found.
dlls/mmdevapi/audiovolume.c
View file @
620cfe7e
...
...
@@ -44,6 +44,7 @@ typedef struct AEVImpl {
IAudioEndpointVolumeEx
IAudioEndpointVolumeEx_iface
;
LONG
ref
;
float
master_vol
;
BOOL
mute
;
}
AEVImpl
;
static
inline
AEVImpl
*
impl_from_IAudioEndpointVolumeEx
(
IAudioEndpointVolumeEx
*
iface
)
...
...
@@ -197,18 +198,30 @@ static HRESULT WINAPI AEV_GetChannelVolumeLevelScalar(IAudioEndpointVolumeEx *if
static
HRESULT
WINAPI
AEV_SetMute
(
IAudioEndpointVolumeEx
*
iface
,
BOOL
mute
,
const
GUID
*
ctx
)
{
AEVImpl
*
This
=
impl_from_IAudioEndpointVolumeEx
(
iface
);
HRESULT
ret
;
TRACE
(
"(%p)->(%u,%s)
\n
"
,
iface
,
mute
,
debugstr_guid
(
ctx
));
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
ret
=
This
->
mute
==
mute
?
S_FALSE
:
S_OK
;
This
->
mute
=
mute
;
return
ret
;
}
static
HRESULT
WINAPI
AEV_GetMute
(
IAudioEndpointVolumeEx
*
iface
,
BOOL
*
mute
)
{
AEVImpl
*
This
=
impl_from_IAudioEndpointVolumeEx
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
mute
);
if
(
!
mute
)
return
E_POINTER
;
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
*
mute
=
This
->
mute
;
return
S_OK
;
}
static
HRESULT
WINAPI
AEV_GetVolumeStepInfo
(
IAudioEndpointVolumeEx
*
iface
,
UINT
*
stepsize
,
UINT
*
stepcount
)
...
...
dlls/mmdevapi/tests/render.c
View file @
620cfe7e
...
...
@@ -2248,6 +2248,7 @@ static void test_endpointvolume(void)
HRESULT
hr
;
IAudioEndpointVolume
*
aev
;
float
mindb
,
maxdb
,
increment
,
volume
;
BOOL
mute
;
hr
=
IMMDevice_Activate
(
dev
,
&
IID_IAudioEndpointVolume
,
CLSCTX_INPROC_SERVER
,
NULL
,
(
void
**
)
&
aev
);
...
...
@@ -2271,6 +2272,12 @@ static void test_endpointvolume(void)
hr
=
IAudioEndpointVolume_SetMasterVolumeLevel
(
aev
,
volume
,
NULL
);
ok
(
hr
==
S_OK
,
"SetMasterVolumeLevel failed: 0x%08x
\n
"
,
hr
);
hr
=
IAudioEndpointVolume_GetMute
(
aev
,
&
mute
);
ok
(
hr
==
S_OK
,
"GetMute failed: %08x
\n
"
,
hr
);
hr
=
IAudioEndpointVolume_SetMute
(
aev
,
mute
,
NULL
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"SetMute failed: %08x
\n
"
,
hr
);
IAudioEndpointVolume_Release
(
aev
);
}
...
...
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