diff options
Diffstat (limited to 'alsa')
-rw-r--r-- | alsa/sbc.c | 4 | ||||
-rw-r--r-- | alsa/sbc.h | 2 |
2 files changed, 6 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; } @@ -41,6 +41,8 @@ struct sbc_struct { int size; int len; + unsigned long duration; + void *priv; }; |