From dbb4a973d5b265130df178ca62c094ec7c45ce47 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 8 Nov 2012 03:13:47 +0200 Subject: 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. --- audio/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio') diff --git a/audio/mixer.c b/audio/mixer.c index 985ccb6516..eb756f90b4 100644 --- a/audio/mixer.c +++ b/audio/mixer.c @@ -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); } -- cgit v1.2.3