Thanks, it seems I missed that function :). Laurentiu Nicola On Wed, Jun 4, 2014, at 16:17, Tanu Kaskinen wrote: > On Wed, 2014-06-04 at 16:05 +0300, Lauren?iu Nicola wrote: > > Hello, > > > > > > I want to write a small application that reads some data from the > > network and makes a few libpulse calls. I have some questions about > > the PulseAudio non-threaded main loop. > > > > > > 1. Is there a way to add my fd to the PulseAudio main loop, so I can > > be notified of any events? Would calling pa_mainloop_set_poll_func > > with a function that copies the pollfd list and appends mine be the > > proper way to do it? > > pa_mainloop_api has the io_new function pointer, which you can use to > add new fds to the mainloop. > > > 2. Is pa_context reentrant in that I can have multiple operations > > executing at the same time? If not, can a new operation be started > > during the callback of a previous one, or must I wait for > > pa_mainloop_dispatch() / pa_mainloop_iterate() to finish? > > Multiple operations can execute simultaneously, starting a new operation > from the callback of another operation is fine. > > -- > Tanu > >