[pulseaudio-discuss] Per-application volume glitching, and an idea for multiple channel volume control

Jud Craft craftjml at gmail.com
Sun Dec 21 10:32:28 PST 2008


Hello there!  I've noticed a peculiar symptom using Pulseaudio
(0.9.13) on Fedora 10.  Particularly this is related to
per-application volume.  In a nutshell:

1.  The "system sounds" entry in pavucontrol pays no attention to what
volume level you set for it:  on my system, it consistently resets
itself to 50%, and at random, jumps up to 100%.  This causes some
system event sounds to be too quiet while others are obnoxiously loud.

2.  System sounds themselves seem to disregard this and play at
different volumes anyway.  For example, the "dialog-cancel" sound,
when a dialog box is closed or cancelled, is a giant "thump!" several
times louder than the default close-window sound.  (I recall reading
somewhere that a "libcanberra" is responsible for system-event-sounds,
so perhaps the error lies there).  The login sound varies on its own
from obscenely loud to randomly soft.

3.  Applications tend to forget their per-audio settings (this may be
related to an earlier post I read on the December 2008 posts, where
streams that change between mono and stereo may possible reset their
volume levels, and another one from June 2007, where some crazy X
session voodoo may prevent Pulseaudio from remembering per-app
settings.  But I had hoped this was fixed.).

As a suggestion, it would be useful if Pavucontrol had a "Previous
Applications" tab which displayed the levels of previously encountered
streams/programs, and let you change the volume there.  (Pulseaudio
seems to notice a program ONLY when it plays a sound, and in the case
of Pidgin for example, many sounds are too short to reach Pavucontrol
in time to change settings.  Compare Windows Vista, where a program's
sound settings are persistently shown in Volume Control, even when the
program is silent.)



Also, in regards to #3 (the mono/stereo thing), the post that I found
on the mailing lists earlier mentions that PulseAudio will have an
intelligent algorithm to adjust the volume when a stream switches from
Mono to Stereo.  This seems a little counterintuitive, as it always
means there will be some information loss when going from Mono to
Stereo.

You'll notice that Windows Vista doesn't suffer from this problem,
since it doesn't expose different channels at all:  each source has
only one master volume control for that whole source, ignoring
per-channel volume.

I think this is a smart thing:  should it be PulseAudio's job to
figure out the channel arrangements of every app?  But if it should,
then how about the following idea:  what if Pulseaudio exposed two
things.

1) A master volume control for each source, similar to Vista, that is
channel-agnostic

2) A separate set of channel values, which are relative scalar to each
other.  So a user can set a balance between the different channels
(say, 25% left, 100% right), and still control the overall volume
using a single slider;  this allows him to set a balance for the
channels using the full slider range that is independent of the actual
intensity of sound coming from the channel.

So instead of setting 10% left, 20% right, he can set 20% overall,
100% right, and 50% left.  Pulseaudio would use the overall volume,
and the channel-specific volumes, to mix that source.

This would allow you to simplify the interface of Pavucontrol as well:
 instead of each source exposing "Mono/Stereo" information and sliders
for each channel, merely expose the Overall volume level.  The
individual channel balances could be accessible via a popup window,
removing a lot of clutter from the interface but still allowing a
startling degree of power.



At the moment, PulseAudio is very interesting, but the random volume
vagaries often serve to drive me batty; nothing seems to properly
remember what volume it should be.  But it will be quite a marvel when
it finishes maturing.



More information about the pulseaudio-discuss mailing list