<div dir="ltr">Dear tanu,<br><div><br>>Are the two pa_context pointers different? You should have just one<br>
>context.</div><div><br></div><div>Yes, I called function like this in the stream callback: (s : pa_stream *s)<br></div><div>switch(pa_stream_get_state){<br></div><div> case <span class="gmail-im">PA_STREAM_FAILED</span>:</div><div><span class="gmail-im"> </span><span class="gmail-im"><span class="gmail-im">  printf("%s\n, </span><span class="gmail-im"><span class="gmail-im">pa_strerror(</span>pa_context_errno(s)); </span><span class="gmail-im"></span></span><span class="gmail-im"><br></span></div><div><span class="gmail-im">   printf("%s\n, pa_strerror(pa_context_errno(pa_stream_<wbr>get_context(s))));</span></div><div class="gmail_extra"><div class="gmail_extra"><span class="gmail-im">I check the argument, first one is wrong argument, so I got error "Invalid argument" in second printf().<br></span></div><div class="gmail_extra"><span class="gmail-im"><br></span></div><div class="gmail_extra"><span class="gmail-im">So, I have additional question.</span></div><div class="gmail_extra"><span class="gmail-im">I could call pa_stream_new, pa_stream_connect_record and </span><br><span class="gmail-im"><span class="gmail-im">pa_stream_connect_playback without error in context state callback with PA_CONTEXT_READY.<br></span></span></div><div class="gmail_extra"><span class="gmail-im"><span class="gmail-im">I think I can call these function correctly. I can't understand this process is "Invalid argument".<br></span></span></div><div class="gmail_extra"><span class="gmail-im">Is something coming up? <br></span></div><div class="gmail_extra"><span class="gmail-im"><br></span></div><span class="gmail-im">Best Regards,</span></div><div class="gmail_extra"><span class="gmail-im">Shinnosuke Suzuki</span><br></div><div class="gmail_extra"><div class="gmail_extra"><div class="gmail_quote">2017-10-15 18:07 GMT+09:00 Tanu Kaskinen <span dir="ltr"><<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Sun, 2017-10-15 at 17:02 +0900, Shinnosuke Suzuki wrote:<br>
> Dear tanu,<br>
><br>
> > There can be only one error at a time, but here you list two errors. In<br>
> > what situations these errors happen?<br>
><br>
> I got two errors at the same point in the stream callback with a state<br>
> PA_STREAM_FAILED.<br>
> I got the errors by two ways, one is to call only pa_context_errno,<br>
> the other is to call pa_context_errno(pa_stream_<wbr>get_context()).<br>
<br>
</span>Are the two pa_context pointers different? You should have just one<br>
context.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--<br>
Tanu<br>
<br>
<a href="https://www.patreon.com/tanuk" rel="noreferrer" target="_blank">https://www.patreon.com/tanuk</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">--<br>Shinnosuke Suzuki<br>E-mail : <a href="mailto:suzukisn@gmail.com" target="_blank">suzukisn@gmail.com</a></div>
</div></div></div>