diff options
author | Sjoerd Simons <sjoerd@debian.org> | 2009-04-15 22:50:00 +0100 |
---|---|---|
committer | Sjoerd Simons <sjoerd@debian.org> | 2009-04-15 22:50:00 +0100 |
commit | 2333d7cffc05252fa3185ca126ef1ff0b5d73aa6 (patch) | |
tree | e2014ac84fbfcd8bda713784aa64edc4f061af93 /src/modules/bluetooth/sbc.h | |
parent | 897e73dc49c7f4019450a21fec07d054d769d1dc (diff) |
Imported Upstream version 0.9.15
Diffstat (limited to 'src/modules/bluetooth/sbc.h')
-rw-r--r-- | src/modules/bluetooth/sbc.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/modules/bluetooth/sbc.h b/src/modules/bluetooth/sbc.h index f9d506b..6543588 100644 --- a/src/modules/bluetooth/sbc.h +++ b/src/modules/bluetooth/sbc.h @@ -31,6 +31,7 @@ extern "C" { #endif #include <stdint.h> +#include <sys/types.h> /* sampling frequency */ #define SBC_FREQ_16000 0x00 @@ -81,14 +82,25 @@ typedef struct sbc_struct sbc_t; int sbc_init(sbc_t *sbc, unsigned long flags); int sbc_reinit(sbc_t *sbc, unsigned long flags); -int sbc_parse(sbc_t *sbc, void *input, int input_len); -int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output, - int output_len, int *len); -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); -uint16_t sbc_get_codesize(sbc_t *sbc); + +ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len); + +ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len, + void *output, size_t output_len, size_t *written); + +/* Encodes ONE input block into ONE output block */ +ssize_t sbc_encode(sbc_t *sbc, const void *input, size_t input_len, + void *output, size_t output_len, size_t *written); + +/* Returns the output block size in bytes */ +size_t sbc_get_frame_length(sbc_t *sbc); + +/* Returns the time one input/output block takes to play in msec*/ +unsigned sbc_get_frame_duration(sbc_t *sbc); + +/* Returns the input block size in bytes */ +size_t sbc_get_codesize(sbc_t *sbc); + const char *sbc_get_implementation_info(sbc_t *sbc); void sbc_finish(sbc_t *sbc); |