#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "sbc_encoder.h"
#include "oi_codec_sbc.h"
#include "oi_status.h"
Go to the source code of this file.
◆ sbc_alloc_mthd
SBC allocation method.
Enumerator |
---|
SBC_ALLOC_MTHD_LOUDNESS | Loudness allocation method.
|
SBC_ALLOC_MTHD_SNR | SNR allocation method.
|
◆ sbc_ch_mode
SBC channel mode.
Enumerator |
---|
SBC_CH_MODE_MONO | Mono channel.
|
SBC_CH_MODE_DUAL_CHANNEL | Dual channel.
|
SBC_CH_MODE_STEREO | Stereo channel.
|
SBC_CH_MODE_JOINT_STEREO | Joint stereo channel.
|
◆ sbc_decode()
Decode a frame.
- Parameters
-
decoder | Handle of the decoder. |
in_data | Input bitstream, it is increased after decode one frame |
in_size | Input data size in bytes, it is decreased after decode one frame |
out_data | Output PCM samples |
out_size | Output data size in bytes |
- Returns
- Zero on success or (negative) error code otherwise.
◆ sbc_encode()
Encode a frame.
- Parameters
-
encoder | Handle of the encoder. |
in_data | Input PCM samples. |
out_data | Encoded SBC frame. |
- Returns
- The encoded size of the frame in bytes.
◆ sbc_frame_bytes()
Return the number of PCM bytes in a frame.
- Parameters
-
encoder | Handle of the encoder. |
- Returns
- Number of PCM bytes or (negative) error code otherwise
◆ sbc_frame_encoded_bytes()
int sbc_frame_encoded_bytes |
( |
struct sbc_encoder * | encoder | ) |
|
Return the encoded size of one frame.
- Parameters
-
encoder | Handle of the encoder. |
- Returns
- The encoded size of one frame in bytes or (negative) error code otherwise.
◆ sbc_frame_samples()
Return the number of PCM samples in a frame.
- Parameters
-
encoder | Handle of the encoder. |
- Returns
- Number of PCM samples or (negative) error code otherwise.
◆ sbc_setup_decoder()
Setup the SBC decoder.
- Parameters
-
decoder | Handle of the decoder. |
- Returns
- Zero on success or (negative) error code otherwise.
◆ sbc_setup_encoder()
Setup encoder.
- Parameters
-
- Returns
- Zero on success or (negative) error code otherwise.