[pulseaudio-discuss] pa_stream_connect_playback bad state

Tanu Kaskinen tanuk at iki.fi
Thu Feb 18 06:17:39 PST 2010


to, 2010-02-18 kello 10:43 +0100, Gian Lorenzo Meocci kirjoitti:
> when I call pa_stream_connect_playback I always obtain bad state. Why?

The connection to the server hasn't been properly established yet when
you call pa_stream_connect_playback(). Right after calling
pa_context_connect() you should register a callback with
pa_context_set_state_callback() that gets called whenever the context
state changes. Then run the mainloop until the state becomes
PA_CONTEXT_READY or PA_CONTEXT_FAILED, see pa_context_get_state().

Hope this helps.

-- 
Tanu Kaskinen




More information about the pulseaudio-discuss mailing list