[pulseaudio-discuss] Stream volumes as the universal volume adjustment method
tanuk at iki.fi
Thu Jan 14 21:34:53 PST 2010
to, 2010-01-14 kello 23:08 +0100, Lennart Poettering kirjoitti:
> On Thu, 07.01.10 18:30, Tanu Kaskinen (tanuk at iki.fi) wrote:
> > The logic for ToggleMute:
> > - If all sinks are unmuted, mute all sinks.
> > - If all sinks are muted, unmute all sinks.
> > - If only some sinks are muted, then
> > A) if there are no active streams, mute all sinks.
> > B) if there are active streams, of which at least some output to
> > unmuted sinks, mute all sinks.
> > C) otherwise unmute all sinks.
> Having a global mute/unmute certainly does make sense, I
> agree. However it's a bit weird too. Let's say I have a bt headset and
> internal speakers. I am in that dreaded airport lounge again because
> the airline wanted to give me a second chance after i sued them in the
> US because my suicide attempt by eating gummi bears failed. So I am
> listening to Beethoven 9th with the BT headset in the lounge. The
> laptop speakers are muted, the BT headset is not. Temporarily i want
> mute old Ludwig, so I press that key, all audio is turned off. Then I
> want to unmute again and press that button again. Now both sinks would
> get unmuted and because I use module-combine I blast the 9th into the
> lounge again. Get kicked out again. Detained by the US government, due
> to musical terrorism. I grow a beard and start to wear orange jump
> suits, and never want to hear Beethoven again. What a loss! And it's
> all your algorithm's fault! See! q.e.d.
Ok, maybe the proposed logic isn't perfect. Wouldn't it be a good idea
to have module-dwim anyway, regardless of the actual logic? I guess
currently the software that handles the hardware volume/mute events
adjusts just the fallback sink (assumedly via the alsa plugin), which is
quite stupid. Since there are probably multiple hardware event handler
software implementations for different desktop environments, the logic
should be in a central place, i.e. pulseaudio. The module could even
start with the silly logic of just controlling the fallback sink, until
someone comes up with something better.
More information about the pulseaudio-discuss