[pulseaudio-discuss] [RFC] Per-client flat-volumes control
Alexander E. Patrakov
patrakov at gmail.com
Tue Aug 5 20:39:40 PDT 2014
06.08.2014 06:31, Arun Raghavan wrote:
> On 6 August 2014 01:12, Alexander E. Patrakov <patrakov at gmail.com> wrote:
>> I think that the real problem that needs to be solved is not only that flat
>> volumes are inapplicable to the web, but also that PulseAudio doesn't
>> provide any API for intra-application mixing. Please see my earlier thoughts
>> on it here (point 7):
>>
>> http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-February/019968.html
>>
>> In other words: please add new API that would allow a browser to implement a
>> per-tab (flat or non-flat, as configured in daemon.conf) visible volume
>> control, with several substreams being mixed for each tab by PulseAudio. The
>> javascript inside the browser should be able to set, invisibly for the user,
>> tab-relative (and thus non-flat) volumes for each substream.
>
> I don't think this really feasible - in this case, you need some way
> to control per-tab volume as well, and that's a UI change that we are
> in no position to effect across browsers.
Yes, what I am proposing is a big change in the volume model. External
UIs such as pavucontrol should still be able to introspect and control
stream volumes as usual, but a new class of streams (those that don't
send samples themselves, but only allow their slave substreams to do so)
would be introduced. Substream volumes should not be introspectable and
should apply in a non-flat fashion on top of the stream volume.
Browsers are expected to create this two-level hierarchy of streams: one
master stream per tab, with a description matching the tab title, and as
many substreams for that master stream as there are audio elements or
other sound-producing HTML5 thingies on that tab.
Basically, not what's on the attached screenshot (taken with non-flat
volumes). Any browser that does this "three sliders with meaningless
titles in one tab" thing is buggy.
Note that Tanu has not flagged my proposal as unfeasible. On the
contrary, he said that he could mentor this. So, I would like to see
some discussion between you. I do agree that it is not feasible for
PulseAudio 6.0.
If you still think that it is unfeasible at all, then there is exactly
nothing to do on the PulseAudio side. In this case, or if depending on
PulseAudio 7.0 is unacceptable, we should propagate the following idea
to the browser vendors: "play one stream per tab, mix in-tab sources
yourself and apply javascript-settable volumes before sending the result
to PulseAudio".
Please see commit 3535fd7a076228fdeae3755cf8ac6fdcfa28741d, it already
does this kind of propaganda.
--
Alexander E. Patrakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qupzilla-bug.png
Type: image/png
Size: 85086 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20140806/eecc5ea5/attachment-0001.png>
More information about the pulseaudio-discuss
mailing list