[pulseaudio-discuss] Per-app flat volume adjustment is highly unintuitive, if mathematically consistent.

Lennart Poettering lennart at poettering.net
Wed May 27 08:23:38 PDT 2009


On Wed, 27.05.09 09:13, Jud Craft (craftjml at gmail.com) wrote:

> 
> On Wed, May 27, 2009 at 5:07 AM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> > The way I understand it, and apologies if I'm wrong here, is that Banshess
> > want's 80% and it's the only app playing. In order to achieve that result,
> > pulse does not scale the stream at all but sets the underlying hardware
> > volume to 80% (but in dB's yada yada!). So the net result is I get sound at
> > the right volume.
> 
> Right, but you did not address an important detail of my example.
> Keep reading...
> 
> > Then another stream joins that wants 100% So, pulse will start scaling the
> > Banshee stream to ensure it is scaled in software to 80%, and turn up the
> > underlying hardware volume to 100%. Net result is that Banshee continues
> > playing at the same level and sounds the same but the new stream can be
> > louder.
> 
> So far so good.  When running Banshee (80%), and, say, Firefox (100%).
>  Main system volume is 100%.  I am in agreement with your explanation
> thus far.
> 
> 
> 
> Now...for the catch.

Mate, pleas just read those mails I wrote yesterday.

> Close Firefox.  Only Banshee runs.  System volume has now dropped back
> to 80% (hardware volume has been changed to 80% too), since that's
> Banshee's volume.

If you close ff (actually flash) PA will remember that it was at 100%
of the device volume.

> Now, increase the system volume to 100%.  Banshee is now 100%.
> 
> Then, turn back on Firefox and play a video.  What should happen?
> Since the Banshee : Firefox ratio was previously 0.8 : 1.0, my theory
> was that Banshee should be pushed down to 80% and Firefox starts
> playing at 100% (the system volume) again.
>
> However, when I tried it last night, they both stayed at 100%, and I
> lost the relative volume difference between them.  (This was with
> flat-volumes enabled).

Yes, PA restores flash's volume according to what it saved previously:
to 100% of the device volume.

> So when I changed Banshee to 100% when it was running alone, it
> appears that Pulse forgot that Banshee-Firefox have an 0.8 : 1.0
> ratio.  (Note, maybe this was a bug, and Pulse should have remembered.
>  I'm not sure, since I can't tell what's intentional and what might be
> a bug, since I haven't figured out what "flat volumes" mean in terms
> of user volume interaction.  It didn't make sense to me that Pulse
> forgot remember the ratio, but maybe that's how it's supposed to be.)

PA is not storing stream volumes relative to each other but relative
to the sink's refernce volume. 

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list