Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
3da8bccd
Commit
3da8bccd
authored
Mar 01, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevice: print endpoint volume range to debug
parent
15e0df6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
modules/audio_output/mmdevice.c
modules/audio_output/mmdevice.c
+22
-0
No files found.
modules/audio_output/mmdevice.c
View file @
3da8bccd
...
...
@@ -31,6 +31,7 @@
#include <assert.h>
#include <audiopolicy.h>
#include <mmdeviceapi.h>
#include <endpointvolume.h>
DEFINE_PROPERTYKEY
(
PKEY_Device_FriendlyName
,
0xa45c254e
,
0xdf1c
,
0x4efd
,
0x80
,
0x20
,
0x67
,
0xd1
,
0x46
,
0xa8
,
0x50
,
0xe0
,
14
);
...
...
@@ -695,6 +696,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
IAudioSessionManager
*
manager
;
IAudioSessionControl
*
control
;
ISimpleAudioVolume
*
volume
;
IAudioEndpointVolume
*
endpoint
;
void
*
pv
;
HRESULT
hr
;
...
...
@@ -783,6 +785,23 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
volume
=
NULL
;
}
hr
=
IMMDevice_Activate
(
sys
->
dev
,
&
IID_IAudioEndpointVolume
,
CLSCTX_ALL
,
NULL
,
&
pv
);
endpoint
=
pv
;
if
(
SUCCEEDED
(
hr
))
{
float
min
,
max
,
inc
;
hr
=
IAudioEndpointVolume_GetVolumeRange
(
endpoint
,
&
min
,
&
max
,
&
inc
);
if
(
SUCCEEDED
(
hr
))
msg_Dbg
(
aout
,
"volume from %+f dB to %+f dB with %f dB increments"
,
min
,
max
,
inc
);
else
msg_Err
(
aout
,
"cannot get volume range (error 0x%lx)"
,
hr
);
}
else
msg_Err
(
aout
,
"cannot activate endpoint volume (error %lx)"
,
hr
);
/* Main loop (adjust volume as long as device is unchanged) */
while
(
sys
->
device
==
NULL
)
{
...
...
@@ -832,6 +851,9 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
}
LeaveCriticalSection
(
&
sys
->
lock
);
if
(
endpoint
!=
NULL
)
IAudioEndpointVolume_Release
(
endpoint
);
if
(
manager
!=
NULL
)
{
/* Deregister callbacks *without* the lock */
if
(
volume
!=
NULL
)
...
...
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