if (written)
*written = framelen;
- sbc->duration = (1000000 * priv->frame.subbands * priv->frame.blocks) / sbc->rate;
-
return samples * sbc->channels * 2;
}
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;
int bitpool;
int swap;
- unsigned long duration;
-
void *priv;
};
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);