Commit fce950fc authored by David Fuhrmann's avatar David Fuhrmann

auhal: do not change volume when muted

parent 216b6ea6
......@@ -1275,7 +1275,7 @@ static int SwitchAudioDevice(audio_output_t *p_aout, const char *name)
static int VolumeSet(audio_output_t * p_aout, float volume)
{
struct aout_sys_t *p_sys = p_aout->sys;
OSStatus ostatus;
OSStatus ostatus = 0;
if(p_sys->b_digital)
return VLC_EGENERIC;
......@@ -1284,12 +1284,14 @@ static int VolumeSet(audio_output_t * p_aout, float volume)
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);
if(!p_sys->b_mute) {
ostatus = AudioUnitSetParameter(p_sys->au_unit,
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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment