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

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

Request immediate start of playback on this stream. This disables prebuffering as specified in the pa_buffer_attr structure, temporarily. Available for playback streams only.

Since:
0.3

Definition at line 1423 of file stream.c.

References PA_ERR_BADSTATE, and PA_STREAM_PLAYBACK.

                                                                                         {
    pa_operation *o;

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

    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_TRIGGER_PLAYBACK_STREAM, cb, userdata)))
        invalidate_indexes(s, 1, 0);

    return o;
}


Generated by  Doxygen 1.6.0   Back to index