Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1e29fbdd
Commit
1e29fbdd
authored
Nov 14, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulseAudio: clean volume conversion boundaries a bit
parent
26921e30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+5
-4
No files found.
modules/audio_output/pulse.c
View file @
1e29fbdd
...
@@ -569,15 +569,16 @@ static int VolumeSet(audio_output_t *aout, float vol)
...
@@ -569,15 +569,16 @@ static int VolumeSet(audio_output_t *aout, float vol)
aout_sys_t
*
sys
=
aout
->
sys
;
aout_sys_t
*
sys
=
aout
->
sys
;
pa_stream
*
s
=
sys
->
stream
;
pa_stream
*
s
=
sys
->
stream
;
pa_operation
*
op
;
pa_operation
*
op
;
pa_volume_t
volume
;
/* VLC provides the software volume so convert directly to PulseAudio
/* VLC provides the software volume so convert directly to PulseAudio
* software volume, pa_volume_t. This is not a linear amplification factor
* software volume, pa_volume_t. This is not a linear amplification factor
* so do not use PulseAudio linear amplification! */
* so do not use PulseAudio linear amplification! */
vol
*=
PA_VOLUME_NORM
;
vol
*=
PA_VOLUME_NORM
;
if
(
unlikely
(
vol
>=
PA_VOLUME_MAX
))
if
(
unlikely
(
vol
>=
(
float
)
PA_VOLUME_MAX
))
vol
=
PA_VOLUME_MAX
;
vol
ume
=
PA_VOLUME_MAX
;
else
pa_volume_t
volume
=
lroundf
(
vol
);
volume
=
lroundf
(
vol
);
if
(
s
==
NULL
)
if
(
s
==
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