[MPlayer-dev-eng] [PATCH 1/2] mixer: do not unmute to volume 0, instead unmute to max.

Andy Furniss adf.lists at gmail.com
Tue Apr 8 11:15:45 CEST 2014


Reimar Döffinger wrote:
> On 08.04.2014, at 02:31, Hans-Dieter Kosch <hdkosch at kabelbw.de>
> wrote:
>> Reimar Döffinger wrote:
>>
>>> 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. --- mixer.c | 7 ++++++- 1 file changed, 6
>>> insertions(+), 1 deletion(-) diff --git a/mixer.c b/mixer.c index
>>> 8b290d5..d2d6e18 100644 --- a/mixer.c +++ b/mixer.c @@ -129,7
>>> +129,12 @@ void mixer_getbothvolume(mixer_t *mixer, float *b)
>>> 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);
>>
>> Unmute to only 10 or 50 or so, in order to not unexpectedly load
>> the speakers (and the audience's ears) with full power?
>
> That completely breaks the intended purpose of working with devices
> that only have a mute toggle...

That's a shame, not that I use mute amy-way, but my card has a proper
headphone amp and goes really loud as do my headphones.

Using line out to my old stereo system, where the amp is too big for the
speakers, which themselves are quite big/loud would certainly be an
issue. were I say to mute with mixer on 50% and have it unmute to 100.


More information about the MPlayer-dev-eng mailing list