summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-11-08 03:13:47 +0200
committerwm4 <wm4@nowhere>2012-11-14 00:46:15 +0100
commitdbb4a973d5b265130df178ca62c094ec7c45ce47 (patch)
tree851dfc0c0acbbf16d5f8fbb8865bedb5c8b4d470
parent772afce75e9cc6dae96a7e5a429e1884f7e37057 (diff)
downloadmpv-dbb4a973d5b265130df178ca62c094ec7c45ce47.tar.bz2
mpv-dbb4a973d5b265130df178ca62c094ec7c45ce47.tar.xz
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.
-rw-r--r--audio/mixer.c2
1 files changed, 1 insertions, 1 deletions
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);
}