Hi Colin<br><br>Further I tried to implement the BEEP logic for incoming "event" (say sms) during "phone" call stream is active.<br><br>I tried to load and play sample cache..using pa_scache_add_file() and pa_scache_play_item() from module-cork-music-on-phone<br>
<br>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.<br>
<br>Any suggestions or alternate on how to mix the BEEP with phone stream?<br><br>BR,<br>Himanshu<br><br><br><div class="gmail_quote">On Mon, Jun 6, 2011 at 4:09 PM, Colin Guthrie <span dir="ltr"><<a href="mailto:gmane@colin.guthr.ie">gmane@colin.guthr.ie</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi!<br>
<br>
'Twas brillig, and Himanshu Chug at 06/06/11 10:08 did gyre and gimble:<br>
<div class="im">> Thanks Colin for your suggestions, that give me some good directions to<br>
> start with.<br>
><br>
> I tried to modify existing module "module-cork-music-on-phone" , I have<br>
> few queries:<br>
> 1. I am now able to Cork(Pause) the "event" stream while a new "phone"<br>
> stream arrives. but instead my requirement is to to permanently STOP the<br>
> "event" stream<br>
> instead of Corking while "phone" call stream exists? Is there any<br>
> event/api I can use to achieve this?<br>
<br>
</div>No it's up to the application to decide how it handles the cork events.<br>
If it would prefer to stop itself, then that's up to the app. We should<br>
not be deciding policy for this behaviour in PA, just indicating that we<br>
want the application to stop producing audio.<br>
<br>
For more fine grained media player control, I'd recommend using<br>
something like MPRIS or similar.<br>
<div class="im"><br>
<br>
> 2. I just need to give a try to play sample cache (beep) first in the<br>
> same module (module-cork-music-on-phone)<br>
> {Just Playback no role supression initially at this stage} for that:<br>
> - How to init the module so that it would load the<br>
> suppression_sound (if present) into the sample cache<br>
<br>
</div>Just look elsewhere in the code for examples of how to upload samples<br>
to the cache. But as a hint, pa_scache_add_file()<br>
<br>
> - Where (Location) to copy the sound (beep) .wav file ?<br>
<br>
It's up to you. You could just pass a full path in the module argument<br>
or default to /usr/share/sounds if you prefer. Perhaps it's even worth<br>
adding a "suppressed-sound" to the Sound Theme Specification? I think<br>
that's more complicated than it needs to be at this stage however.<br>
<br>
> - How to Play the .wav from the module?<br>
<br>
Again this is in the code but as a hint pa_scache_play_item();<br>
<br>
(I appreciate we don't really have great devel docs here, so the "it's<br>
in the code" argument is pretty weak!)<br>
<br>
Take care<br>
<div><div></div><div class="h5"><br>
Col<br>
<br>
--<br>
<br>
Colin Guthrie<br>
gmane(at)<a href="http://colin.guthr.ie" target="_blank">colin.guthr.ie</a><br>
<a href="http://colin.guthr.ie/" target="_blank">http://colin.guthr.ie/</a><br>
<br>
Day Job:<br>
Tribalogic Limited [<a href="http://www.tribalogic.net/" target="_blank">http://www.tribalogic.net/</a>]<br>
Open Source:<br>
Mageia Contributor [<a href="http://www.mageia.org/" target="_blank">http://www.mageia.org/</a>]<br>
PulseAudio Hacker [<a href="http://www.pulseaudio.org/" target="_blank">http://www.pulseaudio.org/</a>]<br>
Trac Hacker [<a href="http://trac.edgewall.org/" target="_blank">http://trac.edgewall.org/</a>]<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</div></div></blockquote></div><br>