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
284d24cb
Commit
284d24cb
authored
Dec 15, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auhal: fixed mute
parent
5ff2c7a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+22
-7
No files found.
modules/audio_output/auhal.c
View file @
284d24cb
...
...
@@ -1379,18 +1379,18 @@ static int AudioDeviceCallback(vlc_object_t *p_this, const char *psz_variable,
*****************************************************************************/
static
int
VolumeSet
(
audio_output_t
*
p_aout
,
float
volume
)
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
OSStatus
ostatus
;
aout_VolumeReport
(
p_aout
,
volume
);
/* Set volume for output unit */
ostatus
=
AudioUnitSetParameter
(
p_sys
->
au_unit
,
kHALOutputParam_Volume
,
kAudioUnitScope_Global
,
0
,
volume
*
volume
*
volume
,
0
);
kHALOutputParam_Volume
,
kAudioUnitScope_Global
,
0
,
volume
*
volume
*
volume
,
0
);
if
(
var_InheritBool
(
p_aout
,
"volume-save"
))
config_PutInt
(
p_aout
,
"auhal-volume"
,
lroundf
(
volume
*
AOUT_VOLUME_DEFAULT
));
...
...
@@ -1400,9 +1400,24 @@ static int VolumeSet(audio_output_t * p_aout, float volume)
static
int
MuteSet
(
audio_output_t
*
p_aout
,
bool
mute
)
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
OSStatus
ostatus
;
aout_MuteReport
(
p_aout
,
mute
);
return
0
;
float
volume
=
.
0
;
if
(
!
mute
)
volume
=
var_InheritInteger
(
p_aout
,
"auhal-volume"
)
/
(
float
)
AOUT_VOLUME_DEFAULT
;
ostatus
=
AudioUnitSetParameter
(
p_sys
->
au_unit
,
kHALOutputParam_Volume
,
kAudioUnitScope_Global
,
0
,
volume
*
volume
*
volume
,
0
);
return
ostatus
;
}
static
int
Open
(
vlc_object_t
*
obj
)
...
...
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