Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
5bd77e4b
Commit
5bd77e4b
authored
Jun 11, 2006
by
gbazin
Browse files
* src/audio_output/intf.c: optimise aout_VolumeGet a bit.
parent
af23abe4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/audio_output/intf.c
View file @
5bd77e4b
...
...
@@ -61,20 +61,27 @@
*****************************************************************************/
int
__aout_VolumeGet
(
vlc_object_t
*
p_object
,
audio_volume_t
*
pi_volume
)
{
int
i_volume
,
i_result
=
0
;
int
i_result
=
0
;
aout_instance_t
*
p_aout
=
vlc_object_find
(
p_object
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
i_volume
=
config_GetInt
(
p_object
,
"volume"
);
if
(
pi_volume
!=
NULL
)
*
pi_volume
=
(
audio_volume_t
)
i_volume
;
if
(
pi_volume
==
NULL
)
return
-
1
;
if
(
p_aout
==
NULL
)
return
0
;
if
(
p_aout
==
NULL
)
{
*
pi_volume
=
(
audio_volume_t
)
config_GetInt
(
p_object
,
"volume"
);
return
0
;
}
vlc_mutex_lock
(
&
p_aout
->
mixer_lock
);
if
(
!
p_aout
->
mixer
.
b_error
)
{
i_result
=
p_aout
->
output
.
pf_volume_get
(
p_aout
,
pi_volume
);
}
else
{
*
pi_volume
=
(
audio_volume_t
)
config_GetInt
(
p_object
,
"volume"
);
}
vlc_mutex_unlock
(
&
p_aout
->
mixer_lock
);
vlc_object_release
(
p_aout
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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