[pulseaudio-discuss] Couldn't get stream from bluetooth headset

Tanu Kaskinen tanuk at iki.fi
Fri Oct 20 18:20:59 UTC 2017


On Wed, 2017-10-18 at 17:29 +0900, Shinnosuke Suzuki wrote:
> Dear tanu,
> 
> > Are the two pa_context pointers different? You should have just one
> > context.
> 
> Yes, I called function like this in the stream callback: (s : pa_stream *s)
> switch(pa_stream_get_state){
>  case PA_STREAM_FAILED:
>    printf("%s\n, pa_strerror(pa_context_errno(s));
>    printf("%s\n, pa_strerror(pa_context_errno(pa_stream_get_context(s))));
> I check the argument, first one is wrong argument, so I got error "Invalid
> argument" in second printf().

Doesn't your compiler warn you about passing an argument of wrong type
to pa_context_errno()? The function expects a pa_context object, but in
the first case you're passing it a pa_stream object.

-- 
Tanu

https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list