Logo Search packages:      
Sourcecode: pulseaudio version File versions  Download package

int pa_mainloop_iterate ( pa_mainloop m,
int  block,
int *  retval 

Run a single iteration of the main loop. This is a convenience function for pa_mainloop_prepare(), pa_mainloop_poll() and pa_mainloop_dispatch(). Returns a negative value on error or exit request. If block is nonzero, block for events if none are queued. Optionally return the return value as specified with the main loop's quit() routine in the integer variable retval points to. On success returns the number of sources dispatched in this iteration.

Definition at line 947 of file mainloop.c.

    int r;

    if ((r = pa_mainloop_prepare(m, block ? -1 : 0)) < 0)
        goto quit;

    if ((r = pa_mainloop_poll(m)) < 0)
        goto quit;

    if ((r = pa_mainloop_dispatch(m)) < 0)
        goto quit;

    return r;


    if ((r == -2) && retval)
        *retval = pa_mainloop_get_retval(m);
    return r;

Generated by  Doxygen 1.6.0   Back to index