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
01205ea1
Commit
01205ea1
authored
Jul 19, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: convert audio output "volume" to float
parent
7af353d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
src/audio_output/common.c
src/audio_output/common.c
+1
-1
src/audio_output/intf.c
src/audio_output/intf.c
+2
-2
src/audio_output/output.c
src/audio_output/output.c
+1
-5
No files found.
src/audio_output/common.c
View file @
01205ea1
...
...
@@ -73,7 +73,7 @@ audio_output_t *aout_New( vlc_object_t * p_parent )
vlc_value_t
val
,
text
;
char
*
str
;
var_Create
(
aout
,
"volume"
,
VLC_VAR_
INTEGER
|
VLC_VAR_DOINHERI
T
);
var_Create
(
aout
,
"volume"
,
VLC_VAR_
FLOA
T
);
var_Create
(
aout
,
"mute"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
/* Visualizations */
...
...
src/audio_output/intf.c
View file @
01205ea1
...
...
@@ -72,9 +72,9 @@ float aout_VolumeGet (vlc_object_t *obj)
if
(
aout
==
NULL
)
return
-
1
.
f
;
long
l
=
var_InheritInteger
(
aout
,
"volume"
);
float
volume
=
var_GetFloat
(
aout
,
"volume"
);
vlc_object_release
(
aout
);
return
l
/
(
float
)
AOUT_VOLUME_DEFAULT
;
return
volume
;
}
#undef aout_VolumeSet
...
...
src/audio_output/output.c
View file @
01205ea1
...
...
@@ -91,11 +91,7 @@ static void aout_OutputTimeReport (audio_output_t *aout, mtime_t ideal)
*/
static
void
aout_OutputVolumeReport
(
audio_output_t
*
aout
,
float
volume
)
{
long
vol
=
lroundf
(
volume
*
(
float
)
AOUT_VOLUME_DEFAULT
);
/* We cannot acquire the volume lock as this gets called from the audio
* output plug-in (it would cause a lock inversion). */
var_SetInteger
(
aout
,
"volume"
,
vol
);
var_SetFloat
(
aout
,
"volume"
,
volume
);
}
static
void
aout_OutputMuteReport
(
audio_output_t
*
aout
,
bool
mute
)
...
...
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