diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-05-09 10:21:09 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-05-09 10:21:09 +0000 |
commit | c16a9ffd5ee7ad3a184bc3c5ddac2d0049d7243d (patch) | |
tree | e2d86109ad0a60ef97cafc6b1b12743f3a92e8d1 /alsa/sbc.c | |
parent | b4d9988bdaadfe79fd802793e16ef1f77f8c537c (diff) |
Add support for the duration calculation
Diffstat (limited to 'alsa/sbc.c')
-rw-r--r-- | alsa/sbc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1278,6 +1278,8 @@ int sbc_decode(sbc_t *sbc, void *data, int count) sbc->len = samples * priv->frame.channels * 2; + sbc->duration = (1000000 * priv->frame.subbands * priv->frame.blocks) / sbc->rate; + return framelen; } @@ -1337,6 +1339,8 @@ int sbc_encode(sbc_t *sbc, void *data, int count) sbc->len = framelen; + sbc->duration = (1000000 * priv->frame.subbands * priv->frame.blocks) / sbc->rate; + return samples * sbc->channels * 2; } |