[pulseaudio-discuss] dynamic routing through pulse audio

Himanshu Chug himanshu.chug at gmail.com
Wed Jun 8 04:15:33 PDT 2011


Hi Colin

Further I tried to implement the BEEP logic for incoming "event" (say sms)
during "phone" call stream is active.

I tried to load and play sample cache..using pa_scache_add_file() and
pa_scache_play_item() from module-cork-music-on-phone

The sample gets loaded successfully in pa_init() module function, but
actually the problem I am facing is the media.role of sample is set to
"event" by default, ( I checked from pacmd --> list-samples) , so now my
usecase of mixing BEEP (for "event" e.g sms) with "phone" stream is failing
because the BEEP sample is set to media.role=event which gets corked while
"phone" is active , and currently for some reasons its giving segmentation
fault from pa_scache_play_item() function.

Any suggestions or alternate on how to mix the BEEP with phone stream?

BR,
Himanshu


On Mon, Jun 6, 2011 at 4:09 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:

> Hi!
>
> 'Twas brillig, and Himanshu Chug at 06/06/11 10:08 did gyre and gimble:
> > Thanks Colin for your suggestions, that give me some good directions to
> > start with.
> >
> > I tried to modify existing module "module-cork-music-on-phone" , I have
> > few queries:
> > 1. I am now able to Cork(Pause) the "event" stream while a new "phone"
> > stream arrives. but instead my requirement is to to permanently STOP the
> > "event" stream
> >    instead of Corking while "phone" call stream exists? Is there any
> > event/api I can use to achieve this?
>
> No it's up to the application to decide how it handles the cork events.
> If it would prefer to stop itself, then that's up to the app. We should
> not be deciding policy for this behaviour in PA, just indicating that we
> want the application to stop producing audio.
>
> For more fine grained media player control, I'd recommend using
> something like MPRIS or similar.
>
>
> > 2. I just need to give a try to play sample cache (beep) first in the
> > same module (module-cork-music-on-phone)
> >  {Just Playback no role supression initially at this stage}  for that:
> >      -  How to init the module so that  it would load the
> > suppression_sound (if present) into the sample cache
>
> Just look elsewhere in the code for examples of how to upload samples
> to the cache. But as a hint, pa_scache_add_file()
>
> >      -  Where (Location) to copy the sound (beep) .wav file  ?
>
> It's up to you. You could just pass a full path in the module argument
> or default to /usr/share/sounds if you prefer. Perhaps it's even worth
> adding a "suppressed-sound" to the Sound Theme Specification? I think
> that's more complicated than it needs to be at this stage however.
>
> >      -  How to Play the .wav from the module?
>
> Again this is in the code but as a hint pa_scache_play_item();
>
> (I appreciate we don't really have great devel docs here, so the "it's
> in the code" argument is pretty weak!)
>
> Take care
>
> Col
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
>  Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>  Mageia Contributor [http://www.mageia.org/]
>  PulseAudio Hacker [http://www.pulseaudio.org/]
>  Trac Hacker [http://trac.edgewall.org/]
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110608/26b18276/attachment.htm>


More information about the pulseaudio-discuss mailing list