sbc: fix frame_length and codesize documentation
PATCH 1/1 sbc: fix frame_length and codesize documentation
frame_length is the output block size when encoding and the input block size when decoding, with codesize it's vice versa. The documentation was inaccurate regarding this. Using the terms "compressed" and "uncompressed" instead of "output" and "input" should make the function semantics clear.
--- sbc/sbc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sbc/sbc.h +2 -2
@@ -100,13 +100,13 @@ ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,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 output block size in bytes */ +/* Returns the compressed 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 */ +/* Returns the uncompressed block size in bytes */ size_t sbc_get_codesize (sbc_t *sbc);const char *sbc_get_implementation_info (sbc_t *sbc);
Signature · 1 line
2.18.0
Hi Tanu,
Quoted 30 lines · Tanu Kaskinen
frame_lengthis the output block size when encoding and the input block size when decoding, with codesize it's vice versa. The documentation was inaccurate regarding this. Using the terms "compressed" and "uncompressed" instead of "output" and "input" should make the function semantics clear.--- sbc/sbc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)sbc/sbc.h +2
-3@@ -100,13 +100,13 @@ ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,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 output block size in bytes */ +/* Returns the compressed 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 */ +/* Returns the uncompressed block size in bytes */ size_t sbc_get_codesize (sbc_t *sbc);const char *sbc_get_implementation_info (sbc_t *sbc); --
Quoted 1 line
2.18.0
Applied, thanks.
Signature · 1 line
Luiz Augusto von Dentz