Logo Search packages:      
Sourcecode: pulseaudio version File versions

pa_operation* pa_stream_prebuf ( pa_stream s,
pa_stream_success_cb_t  cb,
void *  userdata 
)

Reenable prebuffering as specified in the pa_buffer_attr structure. Available for playback streams only.

Definition at line 1801 of file stream.c.

References PA_ERR_BADSTATE, PA_STREAM_PLAYBACK, and PA_STREAM_READY.

                                                                                        {
    pa_operation *o;

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

    PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
    PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE);
    PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->buffer_attr.prebuf > 0, PA_ERR_BADSTATE);

    if (!(o = stream_send_simple_command(s, PA_COMMAND_PREBUF_PLAYBACK_STREAM, cb, userdata)))
        return NULL;

    /* This might cause the read index to hang again, hence
     * let's request a timing update */
    request_auto_timing_update(s, TRUE);

    return o;
}


Generated by  Doxygen 1.6.0   Back to index