Hi, I think my first reply failed to send and couldn't find the text anywhere... Damn :( 'Twas brillig, and Himanshu Chug at 09/06/11 07:18 did gyre and gimble: > I changed the sample role from proplist in play_beep( ) below: > > static void play_beep(pa_core *core) > { > uint32_t idx; > pa_proplist *pl = pa_proplist_new (); > pa_proplist_sets(pl, PA_PROP_MEDIA_ROLE, "test"); > pa_log ("DBG: %s: %d\n", __func__, __LINE__); > pa_scache_play_item(core, "beep", "alsa_output.hw_0_0", > PA_VOLUME_NORM, pl, &idx); > } Ok some points. 1) If you don't need the idx, just pass NULL. That's what other examples in the code tree do. Look at the other examples for inspiration here. 2) You do not call pa_proplist_free() and thus this is leaky code. 3) You pass a string when the function expects a pa_sink*. If you want to pass a name use pa_scache_play_item_by_name() instead. I'm very surprised the above even compiles. You will almost certainly have a pa_sink* when you call this function so I'd suggest using it. You may also want to chose a slightly less evil volume than PA_VOLUME_NORM, but this can obviously be tweaked later! > Here are the logs for segmentation fault: > > D: module-augment-properties.c: Looking for .desktop file for > gst-launch-0.10 > D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, > base=4, prebuf=0, minreq=1 maxrewind=0 > D: memblockq.c: memblockq sanitized: maxlength=33554432, > tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0 > I: sink-input.c: Created input 1 "Playback Stream" on alsa_output.hw_0_0 > with sample spec s16le 2ch 44100Hz and channel map front-left,front-right > I: sink-input.c: media.role = "event" > I: sink-input.c: media.name <http://media.name> = "Playback Stream" > I: sink-input.c: application.name <http://application.name> = > "gst-launch-0.10" > I: sink-input.c: native-protocol.peer = "UNIX socket client" > I: sink-input.c: native-protocol.version = "16" > I: sink-input.c: application.process.id > <http://application.process.id> = "2465" > I: sink-input.c: application.process.user = "root" > I: sink-input.c: application.process.host = "(none)" > I: sink-input.c: application.process.binary = "gst-launch-0.10" > I: sink-input.c: application.language = "C" > I: sink-input.c: window.x11.display = ":0" > I: sink-input.c: application.process.machine_id = "(none)" > I: sink-input.c: module-stream-restore.id > <http://module-stream-restore.id> = "sink-input-by-media-role:event" > I: protocol-native.c: Requested tlength=200.00 ms, minreq=10.00 ms > D: protocol-native.c: Adjust latency mode enabled, configuring sink > latency to half of overall latency. > D: memblockq.c: memblockq requested: maxlength=4194304, tlength=19404, > base=4, prebuf=0, minreq=1764 maxrewind=0 > D: memblockq.c: memblockq sanitized: maxlength=4194304, tlength=19404, > base=4, prebuf=0, minreq=1764 maxrewind=0 > I: protocol-native.c: Final latency 200.00 ms = 90.00 ms + 2*10.00 ms + > 90.00 ms > D: alsa-sink.c: Latency set to 90.00ms > D: alsa-sink.c: hwbuf_unused=115068 > D: alsa-sink.c: setting avail_min=31855 > *D: core-subscribe.c: Dropped redundant event due to change event. > E: module-cork-music-on-phone.c: DBG: play_beep: 62 > E: core-scache.c: DBG: pa_scache_play_item: 314 > Segmentation fault* You need to get a backtrace. Logging is more or less useless sadly. Run gdb -p `pidof pulseaudio`, then call the handle line as noted on the wiki: http://pulseaudio.org/wiki/Community, then use "continue" and trigger the crash. You'll then get a nice backtrace. 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/]