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

void pa_context_set_event_callback ( pa_context p,
pa_context_event_cb_t  cb,
void *  userdata 
)

Set a callback function that is called whenver a meta/policy control event is received.

Since:
0.9.15

Definition at line 1061 of file context.c.

References PA_CONTEXT_FAILED, and PA_CONTEXT_TERMINATED.

                                                                                            {
    pa_assert(c);
    pa_assert(PA_REFCNT_VALUE(c) >= 1);

    if (pa_detect_fork())
        return;

    if (c->state == PA_CONTEXT_TERMINATED || c->state == PA_CONTEXT_FAILED)
        return;

    c->event_callback = cb;
    c->event_userdata = userdata;
}


Generated by  Doxygen 1.6.0   Back to index