[pulseaudio-discuss] Sink for event sounds? WAS: paplay - sound roles?
Colin Guthrie
gmane at colin.guthr.ie
Tue Jan 5 07:14:14 PST 2010
'Twas brillig, and Lennart Poettering at 05/01/10 15:05 did gyre and gimble:
> On Tue, 05.01.10 10:06, Colin Guthrie (gmane at colin.guthr.ie) wrote:
>
>>> BTW, if you touch this code anyway it might be an idea to create a new
>>> tab which lists more role-specific sliders/dropdowns than just
>>> "event". I.e. a music slider, a telephony sleider and so on.
>>
>> Actually I'm a bit aprehensive about exposing other roles just yet...
>>
>> My reasoning:
>>
>> At present pavucontrol:
>> 1) Shows an Event slider for all sounds with the "event" role.
>> 2) Hides individual streams with the "event" role.
>>
>> This means that there is only one way to adjust the volume of these
>> streams and that is via the stream restore db and the widget.
>>
>> Now the stream restore key format currently has a priority scheme. If a
>> stream that has a role has a role-based rule, it will take precedence
>> over an application based stream (IIRC it's role, app id, app name,
>> media name in that order).
>
> That is true.
>
>> So if I were to expose the other roles, and someone set a volume for
>> e.g. music, then went along and started playing multiple files in e.g.
>> rhythmbox, found it too loud and adjusted the *application* stream for
>> rhythmbox it would be adjusted for that stream and saved to the db as an
>> application specific rule, but the next time rhythmbox played anything
>> (e.g. on track change), the volume would be restored from the *role*
>> based rule.
>
> No. That's not how it works: changing the application volume will
> influence the role volume.
>
> For each stream when it first appears we calculate the key to identify
> it with in the database, both when reading and when writing, and we
> never use anything different during the stream's entire lifetime. That
> means that if for a rhythmbox stream we determine the
> sink-input-by-role:music key then we will read the volume/device with
> is it, and write it too. We will never fiddle with
> sink-input-by-application:Rhythmbox if they role is set.
Ahhhh, good point.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss
mailing list