Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
60578492
Commit
60578492
authored
Jul 19, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amem: use gain request
parent
950e621e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
modules/audio_output/amem.c
modules/audio_output/amem.c
+25
-1
No files found.
modules/audio_output/amem.c
View file @
60578492
...
...
@@ -109,6 +109,27 @@ static int MuteSet (audio_output_t *aout, bool mute)
return
sys
->
set_volume
(
sys
->
opaque
,
sys
->
volume
,
mute
)
?
-
1
:
0
;
}
static
int
SoftVolumeSet
(
audio_output_t
*
aout
,
float
vol
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
vol
=
vol
*
vol
*
vol
;
if
(
!
sys
->
mute
&&
aout_GainRequest
(
aout
,
vol
))
return
-
1
;
sys
->
volume
=
vol
;
return
0
;
}
static
int
SoftMuteSet
(
audio_output_t
*
aout
,
bool
mute
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
if
(
aout_GainRequest
(
aout
,
mute
?
0
.
f
:
sys
->
volume
))
return
-
1
;
sys
->
mute
=
mute
;
return
0
;
}
typedef
int
(
*
vlc_audio_format_cb
)
(
void
**
,
char
*
,
unsigned
*
,
unsigned
*
);
static
int
Open
(
vlc_object_t
*
obj
)
...
...
@@ -221,7 +242,10 @@ static int Open (vlc_object_t *obj)
aout
->
mute_set
=
MuteSet
;
}
else
aout_VolumeSoftInit
(
aout
);
{
aout
->
volume_set
=
SoftVolumeSet
;
aout
->
mute_set
=
SoftMuteSet
;
}
return
VLC_SUCCESS
;
error:
...
...
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