From 8db224b3cae791b950abcc826259ef342161f454 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 23 Nov 2007 14:24:23 +0000 Subject: Introduce sbc_get_frame_duration. --- sbc/sbc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sbc/sbc.c') diff --git a/sbc/sbc.c b/sbc/sbc.c index 50af4a1e..c090dd83 100644 --- a/sbc/sbc.c +++ b/sbc/sbc.c @@ -1372,8 +1372,6 @@ int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output, if (written) *written = framelen; - sbc->duration = (1000000 * priv->frame.subbands * priv->frame.blocks) / sbc->rate; - return samples * sbc->channels * 2; } @@ -1404,6 +1402,11 @@ int sbc_get_frame_length(sbc_t *sbc) return ret; } +int sbc_get_frame_duration(sbc_t *sbc) +{ + return (1000000 * sbc->blocks * sbc->subbands) / sbc->rate; +} + int sbc_get_codesize(sbc_t *sbc) { return sbc->subbands * sbc->blocks * sbc->channels * 2; -- cgit