rendered paste bodyIndex: sbc.c
===================================================================
RCS file: /cvsroot/bluez/utils/sbc/sbc.c,v
retrieving revision 1.24
diff -u -3 -p -u -r1.24 sbc.c
--- sbc.c 13 Nov 2007 20:59:17 -0000 1.24
+++ sbc.c 23 Nov 2007 13:42:34 -0000
@@ -1372,8 +1372,6 @@ int sbc_encode(sbc_t *sbc, void *input,
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;
Index: sbc.h
===================================================================
RCS file: /cvsroot/bluez/utils/sbc/sbc.h,v
retrieving revision 1.8
diff -u -3 -p -u -r1.8 sbc.h
--- sbc.h 13 Nov 2007 20:04:12 -0000 1.8
+++ sbc.h 23 Nov 2007 13:42:34 -0000
@@ -42,8 +42,6 @@ struct sbc_struct {
int bitpool;
int swap;
- unsigned long duration;
-
void *priv;
};
@@ -57,6 +55,7 @@ int sbc_decode(sbc_t *sbc, void *input,
int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output,
int output_len, int *written);
int sbc_get_frame_length(sbc_t *sbc);
+int sbc_get_frame_duration(sbc_t *sbc);
int sbc_get_codesize(sbc_t *sbc);
void sbc_finish(sbc_t *sbc);