diff options
| author | Lennart Poettering <lennart@poettering.net> | 2009-03-20 17:59:40 +0100 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2009-03-20 17:59:40 +0100 | 
| commit | d2bee57ee5f96e0ff91f6bd124083e83ffeb0de2 (patch) | |
| tree | 714c6e48a870ec5fda12ac0236a77ebd3a6a604e /src | |
| parent | 99dae9b1afdc430ca1e1aedc0f4e3554f56c983a (diff) | |
fix prototypes of remaining sbc.[ch] API regarding size_t/const
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/bluetooth/sbc.c | 10 | ||||
| -rw-r--r-- | src/modules/bluetooth/sbc.h | 10 | 
2 files changed, 13 insertions, 7 deletions
diff --git a/src/modules/bluetooth/sbc.c b/src/modules/bluetooth/sbc.c index 6fa54796..42bae91a 100644 --- a/src/modules/bluetooth/sbc.c +++ b/src/modules/bluetooth/sbc.c @@ -973,13 +973,15 @@ int sbc_init(sbc_t *sbc, unsigned long flags)  	return 0;  } -int sbc_parse(sbc_t *sbc, void *input, int input_len) +ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len)  {  	return sbc_decode(sbc, input, input_len, NULL, 0, NULL);  } -int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output, -		int output_len, int *written) +ssize_t sbc_decode(sbc_t *sbc, +               const void *input, size_t input_len, +               void *output, size_t output_len, +               size_t *written)  {  	struct sbc_priv *priv;  	char *ptr; @@ -1020,7 +1022,7 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,  	ptr = output; -	if (output_len < samples * priv->frame.channels * 2) +	if (output_len < (size_t) (samples * priv->frame.channels * 2))  		samples = output_len / (priv->frame.channels * 2);  	for (i = 0; i < samples; i++) { diff --git a/src/modules/bluetooth/sbc.h b/src/modules/bluetooth/sbc.h index 25a12885..9a7b4cec 100644 --- a/src/modules/bluetooth/sbc.h +++ b/src/modules/bluetooth/sbc.h @@ -82,9 +82,13 @@ 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); + +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,  | 
