[pulseaudio-discuss] Moving streams without pavuontrol

Colin Guthrie gmane at colin.guthr.ie
Fri Feb 19 02:18:42 PST 2010


'Twas brillig, and Vegard Vesterheim at 19/02/10 09:36 did gyre and gimble:
> The ability to use programs like pavucontrol to move streams between
> sound cards dynamically is very nice. But if the sound is very short
> it can be a bit cumbersome to do this directly via the gui. I wanted
> to move an alert sound from my IM-client from the headphones to the
> external speakers, but the sound entry appears and disappears too
> quickly for me to catch it in the gui. To work around this, I simply
> temporarily changed the sound to a longer one, giving me enough time
> to click in the gui ;-) 
> 
> Surely there must be a better way to do this?

Yes. Event sounds should be tagged in their proplist as media.role=event

If this is done then the event sounds slider in pavucontrol is used and
you can set the volume etc.

There is no easy way to move this stream to a new device yet due to the
intericases of the stream restore API that I'm currently
discussing/arguing about with Lennart.

Once we've settled on the plan and this is up and running I'll update
pavucontrol so that you can pick a device for whole classes of
applications - e.g. all video sound goes via HDMI, all music sounds via
the 5.1 USB thing and all event sounds via the built in speakers etc.

As things stand just now pavucontrol will actually ignore all event
sounds and wont even show you the stream. This typically means that all
event sounds will go to your default device. Change the default device
and all event sounds will start using it.

> Can I use pacmd or similar to dump the existing mappings, and
> rearrange them?

You can technically use the stream restore extension to write a C
program to update the stream restore database, but tagging the stream is
the more appropriate course of action here.

> Maybe there could be a couple seconds delay in the gui before the
> sound entry disappears? A bit tricky to implement, I guess, because in
> principle, the same event could possibly be triggered multiple times
> in succession.

It would be a bit tricky but not impossible, but like I say anything
that is really short is likely to be an event sound anyway, so tagging
it properly is the right way to go.

Hope this helps.

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