Logo Search packages:      
Sourcecode: pulseaudio version File versions

void pa_stream_set_read_callback ( pa_stream p,
pa_stream_request_cb_t  cb,
void *  userdata 
)

Set the callback function that is called when new data is available from the stream. Return the number of bytes read.

Definition at line 1586 of file stream.c.

References PA_STREAM_FAILED, and PA_STREAM_TERMINATED.

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

    if (s->state == PA_STREAM_TERMINATED || s->state == PA_STREAM_FAILED)
        return;

    s->read_callback = cb;
    s->read_userdata = userdata;
}


Generated by  Doxygen 1.6.0   Back to index