--- sbc/sbc.c | 8 ++++---- sbc/sbc.h | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sbc/sbc.c b/sbc/sbc.c index 886806d..428c8ee 100644 --- a/sbc/sbc.c +++ b/sbc/sbc.c @@ -1378,7 +1378,7 @@ SBC_EXPORT void sbc_finish(sbc_t *sbc) memset(sbc, 0, sizeof(sbc_t)); } -SBC_EXPORT size_t sbc_get_frame_length(sbc_t *sbc) +SBC_EXPORT size_t sbc_get_frame_length(const sbc_t *sbc) { int ret; uint8_t subbands, channels, blocks, joint, bitpool; @@ -1407,7 +1407,7 @@ SBC_EXPORT size_t sbc_get_frame_length(sbc_t *sbc) return ret; } -SBC_EXPORT unsigned sbc_get_frame_duration(sbc_t *sbc) +SBC_EXPORT unsigned sbc_get_frame_duration(const sbc_t *sbc) { uint8_t subbands, blocks; uint16_t frequency; @@ -1448,7 +1448,7 @@ SBC_EXPORT unsigned sbc_get_frame_duration(sbc_t *sbc) return (1000000 * blocks * subbands) / frequency; } -SBC_EXPORT size_t sbc_get_codesize(sbc_t *sbc) +SBC_EXPORT size_t sbc_get_codesize(const sbc_t *sbc) { uint16_t subbands, channels, blocks; struct sbc_priv *priv; @@ -1470,7 +1470,7 @@ SBC_EXPORT size_t sbc_get_codesize(sbc_t *sbc) return subbands * blocks * channels * 2; } -SBC_EXPORT const char *sbc_get_implementation_info(sbc_t *sbc) +SBC_EXPORT const char *sbc_get_implementation_info(const sbc_t *sbc) { struct sbc_priv *priv; diff --git a/sbc/sbc.h b/sbc/sbc.h index 9b8c6f2..b7323e8 100644 --- a/sbc/sbc.h +++ b/sbc/sbc.h @@ -86,15 +86,15 @@ ssize_t sbc_encode(sbc_t *sbc, const void *input, size_t input_len, void *output, size_t output_len, ssize_t *written); /* Returns the compressed block size in bytes */ -size_t sbc_get_frame_length(sbc_t *sbc); +size_t sbc_get_frame_length(const 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 time one input/output block takes to play in msec */ +unsigned sbc_get_frame_duration(const sbc_t *sbc); /* Returns the uncompressed block size in bytes */ -size_t sbc_get_codesize(sbc_t *sbc); +size_t sbc_get_codesize(const sbc_t *sbc); -const char *sbc_get_implementation_info(sbc_t *sbc); +const char *sbc_get_implementation_info(const sbc_t *sbc); void sbc_finish(sbc_t *sbc); #ifdef __cplusplus -- 2.39.5