0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

mixer: fix lowering hw volume while muted

Lowering volume while muted did not work correctly with audio outputs
that support native mute setting separate from volume (ao_alsa and
ao_pulse), because the AO-level volume was not set while muted but was
still being read back. Fix by setting the AO volume in this case.
This commit is contained in:
Uoti Urpala 2012-11-08 03:13:47 +02:00 committed by wm4
parent 772afce75e
commit dbb4a973d5

View File

@ -126,7 +126,7 @@ void mixer_setvolume(mixer_t *mixer, float l, float r)
checkvolume(mixer); // to check mute status and AO support for volume
mixer->vol_l = av_clip(l, 0, 100);
mixer->vol_r = av_clip(r, 0, 100);
if (!mixer->ao || mixer->muted)
if (!mixer->ao || mixer->muted_using_volume)
return;
setvolume_internal(mixer, mixer->vol_l, mixer->vol_r);
}