[pulseaudio-discuss] Adding PulseAudio Capture to OpenAL

Colin Guthrie gmane at colin.guthr.ie
Mon Nov 16 12:52:53 PST 2009


'Twas brillig, and Mike Dickson at 16/11/09 19:39 did gyre and gimble:
> On Fri, 2009-11-13 at 15:37 +0000, Colin Guthrie wrote: 
>> 'Twas brillig, and Mike Dickson at 13/11/09 14:21 did gyre and gimble:
>>> Hmm, ok, very interesting...
>>>
>>> The test code I have (and probably the Vivox SLVoice client which is the
>>> real goal) opens an output stream first and then tries to open the
>>> capture device. It looks like it initializes a "mainloop" for both
>>> streams.  Is that correct behavior or a problem?  I'll do some debugging
>>> around this and see if I can't ferret out a problem.
>> There should only really be one mainloop for a given PA context. If they 
>> start two contexts (which means two connections to PA then there would 
>> probably need to be two mainloops. I'm not really sure tho' as I don't 
>> really know how the integration works.
> 
> I've done some debugging around this and have more data.  The code does
> initialize 2 mainloops for the 2 channels.  It opens the output channel
> first and this is successful.  The hang happens when opening the capture
> session. I see an AUTHORIZING event come back and then it hangs.  The
> mainloop thread is still running.
> 
> Interesting to note, if I switch the order and open the capture session
> first it will hang in exactly the same way when opening the output
> side. 
> 
> Any suggestion on how to debug what's happening in the server and coming
> back to the openal library?

While I'm not 100% sure that using two contexts from the same main loop 
is not supported, I don't really think it makes sense to do that anyway.

I'd look at refactoring things so that one (static) mainloop/context is 
used.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list