From 651e575575c307be75e050ed9600d35a43b7819c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 21 May 2006 14:06:33 +0000 Subject: add new function pa_usec_to_bytes() as inverse of pa_bytes_to_usec() git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@942 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/polyp/sample.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/polyp/sample.h') diff --git a/src/polyp/sample.h b/src/polyp/sample.h index 09b12fd7..2a9a72fe 100644 --- a/src/polyp/sample.h +++ b/src/polyp/sample.h @@ -160,6 +160,9 @@ size_t pa_sample_size(const pa_sample_spec *spec); /** Calculate the time the specified bytes take to play with the specified sample type */ pa_usec_t pa_bytes_to_usec(uint64_t length, const pa_sample_spec *spec); +/** Calculates the number of bytes that are required for the specified time. \since 0.9 */ +size_t pa_usec_to_bytes(pa_usec_t t, const pa_sample_spec *spec); + /** Return non-zero when the sample type specification is valid */ int pa_sample_spec_valid(const pa_sample_spec *spec); -- cgit