diff options
| author | Lennart Poettering <lennart@poettering.net> | 2009-03-23 16:44:11 +0100 |
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2009-03-23 18:20:19 +0100 |
| commit | bdd33f2b51562913a4c73d12213d521480613abf (patch) | |
| tree | ba6eed88d75e6849b3e2437dca4929b51fb0d1c2 /sbc/sbc.h | |
| parent | 44f054fa224dd19de7adb0eb365b261b4cc425f5 (diff) | |
fix up sbc.h prototypes to use const/size_t wherever applicable
Diffstat (limited to 'sbc/sbc.h')
| -rw-r--r-- | sbc/sbc.h | 33 |
1 files changed, 25 insertions, 8 deletions
@@ -31,6 +31,7 @@ extern "C" { #endif #include <stdint.h> +#include <sys/types.h> /* sampling frequency */ #define SBC_FREQ_16000 0x00 @@ -81,14 +82,30 @@ 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); + +/* Decodes ONE input block into ONE output block */ +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); |
