nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ sw_codec_lc3_enc_init()

int sw_codec_lc3_enc_init ( uint16_t  pcm_sample_rate,
uint8_t  pcm_bit_depth,
uint16_t  framesize_us,
uint32_t  enc_bitrate,
uint8_t  num_channels,
uint16_t *const  pcm_bytes_req 
)

#include <lc3/include/sw_codec_lc3.h>

Initializes the LC3 encoder and allocates required RAM.

Parameters
[in]pcm_sample_rateSample rate in Hz (typ. 16000 or 48000)
[in]pcm_bit_depthNumber of bits in sample (typ. 16 or 24)
[in]framesize_usFrame size in microseconds
[in]enc_bitrateBitrate of encoded mono stream (bps) (typ. 24000 - 160000). Consult the LC3 doc for legal values.
[in]num_channelsNumber of channels to initialize
[out]pcm_bytes_reqPCM bytes required to encode a frame.
Note
The return codes from Zephyr and LC3 may overlap.
Returns
0 on success. -EALREADY if already initialized. -EPERM 0 bytes required from PCM sample. Other errors. Refer to LC3 documentation.