On Wed, 29.07.09 10:46, Alvaro Alonso Jim?nez (alvaroalo at gmail.com) wrote: > Hey, > > I have looked into the API and I have realised that there are two ways of > choosing the PulseAudio API for clients, one simple and the other > asynchronous. I have been trying to use the simple one for my purpose (I > need to record an audio stream, but by using the simple one the system waits > for an application generating sound, so it was not the one I needed), so I > would like to try the asynchronous one... However, I am not sure how to > record an audio stream using the asynchronous one, and the example the API > provides is not clarifying at all.. > > I beg you whatever hint you could give me. The doxygen docs give a very terse introduction about the asyhnchronous mode. http://0pointer.de/lennart/projects/pulseaudio/doxygen/ Basically you have to run some kind of event loop. In your case it's a good idea to use the threaded loop I guess. A good example how to use that one is actually the implementation of the simple API: http://git.0pointer.de/?p=pulseaudio.git;a=blob;f=src/pulse/simple.c Yes, the API is not easy to use and we don't have a step-by-step introduction to it. Sorry for that. Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4