Logo Search packages:      
Sourcecode: pulseaudio version File versions

size_t pa_stream_writable_size ( pa_stream p  ) 

Return the number of bytes that may be written using pa_stream_write()

Definition at line 1426 of file stream.c.

References PA_ERR_BADSTATE, PA_ERR_FORKED, PA_STREAM_READY, and PA_STREAM_RECORD.

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

    PA_CHECK_VALIDITY_RETURN_ANY(s->context, !pa_detect_fork(), PA_ERR_FORKED, (size_t) -1);
    PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE, (size_t) -1);
    PA_CHECK_VALIDITY_RETURN_ANY(s->context, s->direction != PA_STREAM_RECORD, PA_ERR_BADSTATE, (size_t) -1);

    return s->requested_bytes > 0 ? (size_t) s->requested_bytes : 0;
}


Generated by  Doxygen 1.6.0   Back to index