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
dc5827ae
Commit
dc5827ae
authored
Apr 09, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid invalid cast (int / uint16_t)
parent
2c10fb73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
src/audio_output/intf.c
src/audio_output/intf.c
+10
-6
No files found.
src/audio_output/intf.c
View file @
dc5827ae
...
...
@@ -148,23 +148,27 @@ int aout_VolumeSet (vlc_object_t *obj, audio_volume_t volume)
#undef aout_VolumeUp
/**
* Raises the volume.
* \param value how much to increase (> 0) or decrease (< 0) the volume
* \param volp if non-NULL, will contain contain the resulting volume
*/
int
aout_VolumeUp
(
vlc_object_t
*
obj
,
int
steps
,
audio_volume_t
*
volp
)
int
aout_VolumeUp
(
vlc_object_t
*
obj
,
int
value
,
audio_volume_t
*
volp
)
{
aout_instance_t
*
aout
;
int
ret
;
in
t
volume
;
audio_volume_
t
volume
;
bool
mute
;
steps
*=
var_InheritInteger
(
obj
,
"volume-step"
);
value
*=
var_InheritInteger
(
obj
,
"volume-step"
);
prepareVolume
(
obj
,
&
aout
,
&
volume
,
&
mute
);
v
olume
+=
steps
;
if
(
v
olum
e
<
AOUT_VOLUME_MIN
)
v
alue
+=
volume
;
if
(
v
alu
e
<
AOUT_VOLUME_MIN
)
volume
=
AOUT_VOLUME_MIN
;
if
(
volume
>
AOUT_VOLUME_MAX
)
else
if
(
value
>
AOUT_VOLUME_MAX
)
volume
=
AOUT_VOLUME_MAX
;
else
volume
=
value
;
ret
=
commitVolume
(
obj
,
aout
,
volume
,
mute
);
if
(
volp
!=
NULL
)
*
volp
=
volume
;
...
...
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