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

pa_usec_t pa_bytes_to_usec ( uint64_t  length,
const pa_sample_spec spec 
)

Calculate the time the specified bytes take to play with the specified sample type

Definition at line 70 of file sample.c.

References pa_sample_spec::rate.

                                                                        {
    pa_assert(spec);

    return (pa_usec_t) (((double) length/pa_frame_size(spec)*1000000)/spec->rate);
}


Generated by  Doxygen 1.6.0   Back to index