[MPlayer-cvslog] r37184 - trunk/mixer.c
reimar
subversion at mplayerhq.hu
Tue May 6 21:02:03 CEST 2014
Author: reimar
Date: Tue May 6 21:02:02 2014
New Revision: 37184
Log:
mixer: do not unmute to volume 0, instead unmute to max.
It's not very useful for unmute to still result in volume 0.
Plus it makes it easier to enable sound for devices that were
on mute at startup.
Modified:
trunk/mixer.c
Modified: trunk/mixer.c
==============================================================================
--- trunk/mixer.c Sat May 3 08:25:05 2014 (r37183)
+++ trunk/mixer.c Tue May 6 21:02:02 2014 (r37184)
@@ -129,7 +129,12 @@ void mixer_getbothvolume(mixer_t *mixer,
void mixer_mute(mixer_t *mixer)
{
- if (mixer->muted) mixer_setvolume(mixer, mixer->last_l, mixer->last_r);
+ if (mixer->muted) {
+ // unmuting to volume 0 makes no sense
+ if (mixer->last_l == 0) mixer->last_l = 100;
+ if (mixer->last_r == 0) mixer->last_r = 100;
+ mixer_setvolume(mixer, mixer->last_l, mixer->last_r);
+ }
else
{
mixer_getvolume(mixer, &mixer->last_l, &mixer->last_r);
More information about the MPlayer-cvslog
mailing list