[pulseaudio-discuss] Couldn't get stream from bluetooth headset
Shinnosuke Suzuki
suzukisn at gmail.com
Sat Oct 21 03:11:05 UTC 2017
Sorry for leading you to misunderstand.
> 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.
I got warning in the first case, so I changed the code like this:
switch(pa_stream_get_state(s)){
case PA_STREAM_FAILED:
printf("%s\n, pa_strerror(pa_context_errno(pa_stream_get_context(s))));
After that, I got error “Invalid argument”.
Best Regards,
Shinnosuke Suzuki
> 2017/10/21 3:20、Tanu Kaskinen <tanuk at iki.fi>のメール:
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20171021/7a60dbd1/attachment.html>
More information about the pulseaudio-discuss
mailing list