[pulseaudio-discuss] Saving stream volumes per physical output

Lennart Poettering lennart at poettering.net
Tue Jan 5 05:13:14 PST 2010


On Tue, 05.01.10 07:29, Tanu Kaskinen (tanuk at iki.fi) wrote:

> If I listen to music with headphones and find that the volume is not
> perfect, I turn the music volume up or down. After this the volume is
> perfect. Then I switch the sink port to laptop speakers. After a while I
> plug the headphones back in. Regardless of what I did to the volume
> while using the laptop speakers, I very likely want the music to have
> the same volume that it had last time I used the headphones.
> 
> Therefore, module-stream-restore has to save the stream volumes
> per-output. I propose that the database key is changed to have the
> following format: "<rolename>@<devicename>@<portname>". The last
> fragment is optional, since not every device has ports. The rolename is
> what is currently used as the database key; do not interpret the
> proposed key format so that I would propose that streams could be
> classified by role only.

In m-s-r we store only relative volumes. i.e. attenuation relative to
the current sink volume. Since the sink volume is always the max of
all streams connected to it this means the attenuation factor we store
is never an amplification.

That means that as long as we save/restore the sink volume itself
adjustments to what we store about the stream volume should not be
necessary.

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