[pulseaudio-discuss] Example using async API

Peter Onion Peter.Onion at btinternet.com
Tue Sep 29 14:08:18 PDT 2009

On Tue, 2009-09-29 at 22:44 +0200, Lennart Poettering wrote:

> If you write output applications it is not recommended to use the glib
> glue coe because you don't want to run the audio IO stuff in the same
> event loop as the slow X stuff. The glib glue code is only useful for
> control applications and for applications where dropouts don't matter
> (such as pavumeter).
> If you want to use the PA for audio IO in a gtk app it is recommended
> to use the trheaded mainloop api to spawn a seperate event loop thread.

Oh ! :-(  I think that's going to mean a major rewrite of my code
because it is currently uses the glib event loop and adds an event
source that checks the alsa device and then creates the required number
of samples.

I've not written any threaded code before so that's another learning
curve !

So my next question is ....  Can you point me to a gtk app example
(preferably in C rather than C++) that woks in this threaded way ?



More information about the pulseaudio-discuss mailing list