![]() |
![]() |
mSBC Library
|
Data Structures | |
struct | sbc_struct |
Structure to hold internal memory and state required by an instance of the mSBC codec. More... | |
Typedefs | |
typedef struct sbc_struct | sbc_t |
Structure to hold internal memory and state required by an instance of the mSBC codec. | |
typedef int32_t | ssize_t |
ssize_t type definition More... | |
Functions | |
ssize_t | sbc_decode (sbc_t *sbc, const void *input, size_t input_len, void *output, size_t output_len, size_t *written) |
Decodes ONE input block into ONE output block. More... | |
ssize_t | sbc_encode (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. More... | |
void | sbc_finish (sbc_t *sbc) |
Reset state and free memory. More... | |
int | sbc_init_msbc (sbc_t *sbc, unsigned long flags) |
Allocate and initialize SBC structures. More... | |
typedef int32_t ssize_t |
ssize_t type definition
This type is a 32-bit signed integer on the TI SimpleLink platform
ssize_t sbc_decode | ( | sbc_t * | sbc, |
const void * | input, | ||
size_t | input_len, | ||
void * | output, | ||
size_t | output_len, | ||
size_t * | written | ||
) |
Decodes ONE input block into ONE output block.
[in] | sbc | An instance of the sbc_t structure |
[in] | input | Pointer to the input bit stream, will be uncompressed |
[in] | input_len | Length of the input array in bytes |
[out] | output | Pointer to memory where output PCM frame will be written |
[in] | output_len | Size of output PCM frame buffer in bytes |
[out] | written | Number of bytes written into output buffer |
-1 Data stream too short -2 Sync byte incorrect -3 CRC8 incorrect -4 Bitpool value out of bounds
ssize_t sbc_encode | ( | 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.
[in] | sbc | An instance of the sbc_t structure |
[in] | input | Pointer to the input PCM frame, will be compressed |
[in] | input_len | Length of the input PCM frame in bytes |
[out] | output | Pointer to memory where output bitstream will be written |
[in] | output_len | Size of output buffer in bytes |
[out] | written | Number of bytes written into output buffer |
void sbc_finish | ( | sbc_t * | sbc | ) |
Reset state and free memory.
This function frees the memory allocated by sbc_init_msbc and resets the sbc structure to a known state.
[in] | sbc | An instance of the sbc_t structure |
int sbc_init_msbc | ( | sbc_t * | sbc, |
unsigned long | flags | ||
) |
Allocate and initialize SBC structures.
This function will initialize the sbc_t structure and allocate from heap private memory used required by the mSBC codec. These structures are set to a known state.
[in] | sbc | An instance of the sbc_t structure |
[in] | flags | This parameter is unused. |