[pulseaudio-discuss] dynamic routing through pulse audio
gmane at colin.guthr.ie
Thu Jun 2 11:07:58 PDT 2011
'Twas brillig, and Himanshu Chug at 02/06/11 14:29 did gyre and gimble:
> Thanks Colin. got your point here.
> Now similar to music cork over phone, I need to cork the stream with
> role="event" when another stream with role="phone" becomes active.
> (here event can be sms alert etc) , Do I need to write any new module
> for this? or this can be achieved some how, any pointers can be helpful?
Initially I'd suggest that you could modify cork-music-on-phone to be
more generic (I've a funny feeling I've suggested this to someone before
too), perhaps renaming it to module-auto-cork or something suitably
generic. Then make it configurable which streams to cork and on which
load-module module-auto-cork trigger_roles=phone,event
The defaults being "phone" for trigger_roles and "music,video" for
> I need to Play a Beep kind of sound when an "event" stream (say sms)
> came during active "phone" call stream and cork the actual "event"
> (sms tone) stream.
> So there are two requirements now:
> 1. Cork the "event" stream during active "phone" stream.
> 2. Mixing the "phone" stream with new Beep stream.
OK, so now this gets a little more complicated. Ultimately you want to
change the event sound to something else... I think this specifically
requires a more specialised module.
Something that, when it finds an event stream while a phone stream is
active, actually plays a different, (much more subtle and unobtrusive)
sound (perhaps a sample in the sound sample cache?) instead.
I think this in particular is more specialise and thus has to be handled
before the module-auto-cork got it's hands on it.
For that reason, I'd suggest a module-event-suppress module, that works
in the following way:
load-module module-role-suppress suppress_roles="event"
This module would work pretty much like I describe above. On init, it
would load the suppression_sound (if present) into the sample cache and
then suppress any event sounds and instead play the sample cache.
I think this would work pretty well.
Tribalogic Limited [http://www.tribalogic.net/]
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss