[pulseaudio-discuss] 100% CPU in pa_mainloop_run

Marcel Müller mm0pointer at maazl.de
Sun Mar 11 13:45:41 PDT 2012

I have ported PulseAudio to OS/2. I finally got the client working. 
(Sink, source and introspection.)

But it required a really dirty patch which I do not understand. I had to 
put the following lines at the end of dispatch_pollfds():

static unsigned dispatch_pollfds(pa_mainloop *m) {


     /* Fix for infinite loop. */
     m->rebuild_pollfds = TRUE;

     return r;

I fact have no idea why this is required to get the client with a 
threaded main loop working. Most likely it will not even hit the nail on 
the head. But at least it fixed my problem. It works stable for hours.
Without the fix as soon as I start playback the client will infinitely 
cycle in the mainloop. poll constantly returns a ready socket but 
nothing else happens.

Any idea what is going on here?


More information about the pulseaudio-discuss mailing list