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. Definition at line 2183 of file stream.c. References PA_ERR_BADSTATE, PA_ERR_FORKED, 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, !pa_detect_fork(), PA_ERR_FORKED); 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); /* Ask for a timing update before we cork/uncork to get the best * accuracy for the transport latency suitable for the * check_smoother_status() call in the started callback */ request_auto_timing_update(s, TRUE); if (!(o = stream_send_simple_command(s, PA_COMMAND_TRIGGER_PLAYBACK_STREAM, cb, userdata))) return NULL; /* This might cause the read index to start moving again, hence * let's request a timing update */ request_auto_timing_update(s, TRUE); return o; }
|