File syn_sbc.c¶
Go to the source code of this file
Bluetooth A2DP Sub-Band Codec (SBC) Decoder implementation.
#include "../util/syn_assert.h"#include "syn_sbc.h"#include <string.h>
Public Static Attributes¶
| Type | Name |
|---|---|
| const int32_t | proto4_40 = /* multi line expression */ |
| const int32_t | proto8_80 = /* multi line expression */ |
| const int32_t | syn_cos4 = /* multi line expression */ |
| const int32_t | syn_cos8 = /* multi line expression */ |
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_sbc_decode_frame (SYN_SBC_Decoder * dec, const uint8_t * in, size_t in_len, int16_t * pcm_out, size_t pcm_cap, size_t * out_samples) Decode a single SBC audio frame to 16-bit interleaved PCM samples. |
| void | syn_sbc_decoder_init (SYN_SBC_Decoder * dec) Initialize an SBC decoder instance. |
| SYN_Status | syn_sbc_parse_header (const uint8_t * data, size_t len, SYN_SBC_FrameInfo * info) Parse an SBC frame header without decoding audio payload. |
Public Static Attributes Documentation¶
variable proto4_40¶
SBC Proto4 Windowing Coefficients for 4-subband synthesis
variable proto8_80¶
SBC Proto8 Windowing Coefficients for 8-subband synthesis (scaled fixed-point Q15)
variable syn_cos4¶
IDCT matrix coefficients Q15 for 4 subbands
variable syn_cos8¶
IDCT matrix coefficients Q15 for 8 subbands
Public Functions Documentation¶
function syn_sbc_decode_frame¶
Decode a single SBC audio frame to 16-bit interleaved PCM samples.
SYN_Status syn_sbc_decode_frame (
SYN_SBC_Decoder * dec,
const uint8_t * in,
size_t in_len,
int16_t * pcm_out,
size_t pcm_cap,
size_t * out_samples
)
Parameters:
decDecoder context pointer.inInput SBC frame buffer starting at syncword 0x9C.in_lenInput frame buffer length.pcm_outOutput 16-bit PCM buffer (interleaved stereo or mono).pcm_capCapacity of output PCM buffer in samples.out_samplesOutput pointer receiving actual decoded sample count.
Returns:
SYN_OK on successful frame decode, or error code (<0).
function syn_sbc_decoder_init¶
Initialize an SBC decoder instance.
Parameters:
decDecoder context pointer.
function syn_sbc_parse_header¶
Parse an SBC frame header without decoding audio payload.
Parameters:
dataInput byte buffer containing SBC stream.lenLength of input buffer in bytes.infoOutput frame header structure.
Returns:
SYN_OK on success, or SYN_INVALID_PARAM / SYN_ERROR if syncword missing or invalid.
The documentation for this class was generated from the following file src/syntropic/audio/syn_sbc.c