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

int pa_mainloop_dispatch ( pa_mainloop m  ) 

Dispatch timeout, io and deferred events from the previously executed poll. Returns a negative value on error. On success returns the number of source dispatched.

Definition at line 873 of file mainloop.c.

    int dispatched = 0;

    pa_assert(m->state == STATE_POLLED);

    if (m->quit)
        goto quit;

    if (m->n_enabled_defer_events)
        dispatched += dispatch_defer(m);
    else {
        if (m->n_enabled_time_events)
            dispatched += dispatch_timeout(m);

        if (m->quit)
            goto quit;

        if (m->poll_func_ret > 0)
            dispatched += dispatch_pollfds(m);

    if (m->quit)
        goto quit;

    m->state = STATE_PASSIVE;

    return dispatched;

    m->state = STATE_QUIT;
    return -2;

Generated by  Doxygen 1.6.0   Back to index