Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d8e3b7a1
Commit
d8e3b7a1
authored
Nov 25, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/audio_output/waveout.c: make sure hardware volume is supported before using it.
parent
1cffaf8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
modules/audio_output/waveout.c
modules/audio_output/waveout.c
+17
-4
No files found.
modules/audio_output/waveout.c
View file @
d8e3b7a1
...
...
@@ -141,7 +141,7 @@ vlc_module_begin();
set_capability
(
"audio output"
,
50
);
set_category
(
CAT_AUDIO
);
set_subcategory
(
SUBCAT_AUDIO_AOUT
);
add_bool
(
"waveout-float32"
,
0
,
0
,
FLOAT_TEXT
,
FLOAT_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"waveout-float32"
,
1
,
0
,
FLOAT_TEXT
,
FLOAT_LONGTEXT
,
VLC_TRUE
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
@@ -250,6 +250,8 @@ static int Open( vlc_object_t *p_this )
}
else
{
WAVEOUTCAPS
wocaps
;
if
(
val
.
i_int
==
AOUT_VAR_5_1
)
{
p_aout
->
output
.
output
.
i_physical_channels
...
...
@@ -292,10 +294,21 @@ static int Open( vlc_object_t *p_this )
aout_VolumeSoftInit
(
p_aout
);
/* Check for hardware volume support */
if
(
waveOutGetDevCaps
(
(
UINT_PTR
)
p_aout
->
output
.
p_sys
->
h_waveout
,
&
wocaps
,
sizeof
(
wocaps
)
==
MMSYSERR_NOERROR
)
&&
wocaps
.
dwSupport
==
WAVECAPS_VOLUME
)
{
DWORD
i_dummy
;
if
(
waveOutGetVolume
(
p_aout
->
output
.
p_sys
->
h_waveout
,
&
i_dummy
)
==
MMSYSERR_NOERROR
)
{
p_aout
->
output
.
pf_volume_infos
=
VolumeInfos
;
p_aout
->
output
.
pf_volume_get
=
VolumeGet
;
p_aout
->
output
.
pf_volume_set
=
VolumeSet
;
}
}
}
waveOutReset
(
p_aout
->
output
.
p_sys
->
h_waveout
);
...
...
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