[pulseaudio-discuss] dynamic routing through pulse audio

Colin Guthrie gmane at colin.guthr.ie
Wed Jun 8 13:21:16 PDT 2011


'Twas brillig, and Himanshu Chug at 08/06/11 12:15 did gyre and gimble:
> 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?

The fifth argument to pa_scache_play_item() is a proplist. Simply create
a pa_proplist and inject an entry that sets media.role to something else
(e.g. phone or simply a blank string). That should override the default
media.role stored with the item itself.

I suspect the segv comes from some kind of loop within your module, but
it's hard to say without a backtrace.

HTHs

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/]



More information about the pulseaudio-discuss mailing list