Re: [orca-list] Per-application volume control



On Mon, Jan 26, 2015 at 09:50:47PM AEDT, Peter Vágner wrote:
Hello,
I've looked at how audio ducking might be configured using pulseaudio.
There is a module-role-ducking not loaded by default since pulseaudio 4.0.
This module is supposed to decrease volume of streams with lower priority
when streams with higher priority are played. The priority is determined by
looking at media.role property pulseaudio clients can set to each sink-input
as it's being created. Pulseaudio recognizes media roles such as music,
video, event, phone, a11y and test. Native gnome applications such as totem
and rhytmbox are already assigning media roles to the sinks they create.
By default music and video streams are ducked when phone stream is playing.
And this can be overridden so in theory we can set duck music and video
whenewer phone, event or a11y is played. I've tried doing that but I have
discovered that pulseaudio module-role-ducking is not monitoring sink states
but it only checks the sink's existence. Speech-dispatcher's pulseaudio
output module is using a single sink to output all the audio which is
perhaps because spawning a new sink every so often we want to play a
synthesised speech would severelly degrade performance. If there is enough
flexibility in the pulseaudio API perhaps speech-dispatcher output module
would be correct place for this kind of feature. I think it might be allowed
to duck other streams when playing speech audio.

Again, we need to make sure speech dispatcher sends audio via PulseAudio on a client basis, not a synth basis 
before we can work out role ducking. As I said in my previous email, a client like Orca could be using 
multiple synths. In addition, it doesn't make sense for speech dispatcher to only register itself with the 
a11y role, because speech dispatcher could be used by non-a11y applications, so we need to add something to 
the API to allow Orca to signal that it is an a11y app.

I don't want to criticize here but I am afraid advice from some
knowledgeable person proficient with linux audio would be verry handy here.
For example other areas to explore include ability to play sound icons by
orca (most likelly using python gstreamer bindings), and perhaps direct
synthesiser support in orca (using the same technology).

Once again, I feel that Speech Dispatcher is in the best place to handle this. Firstly, it does support sound 
icons, although I have never really tested that much, so it is worth looking at, and expanding on. Secondly, 
if Orca were to use gstreamer for example for sound icons, then you have the multiple pulse clients issue 
that I've already raised. Gstreamer is also not known to be reliable when it comes to latency.

Luke


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]