nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ sw_codec_encode()

int sw_codec_encode ( void *  pcm_data,
size_t  pcm_size,
uint8_t **  encoded_data,
size_t *  encoded_size 
)

Encode PCM data and output encoded data.

Note
Takes in stereo PCM stream, will encode either one or two channels, based on channel_mode set during init.
Parameters
[in]pcm_dataPointer to PCM data.
[in]pcm_sizeSize of PCM data.
[out]encoded_dataPointer to buffer to store encoded data.
[out]encoded_sizeSize of encoded data.
Returns
0 if success, error codes depends on sw_codec selected.