WAV Decoder and Encoder

Decode and encode an audio data stream from / to WAV format.

Application Examples

Implementation of this API is demonstrated in the following examples:

API Reference - Decoder

Header File

Functions

audio_element_handle_t wav_decoder_init(wav_decoder_cfg_t *config)

Create an Audio Element handle to decode incoming WAV data.

Return

The audio element handle

Parameters
  • config: The configuration

Structures

struct wav_decoder_cfg_t

brief WAV Decoder configurations

Public Members

int out_rb_size

Size of output ringbuffer

int task_stack

Task stack size

int task_core

Task running in core (0 or 1)

int task_prio

Task priority (based on freeRTOS priority)

bool stack_in_ext

Try to allocate stack in external memory

Macros

WAV_DECODER_TASK_STACK
WAV_DECODER_TASK_CORE
WAV_DECODER_TASK_PRIO
WAV_DECODER_RINGBUFFER_SIZE
DEFAULT_WAV_DECODER_CONFIG()

API Reference - Encoder

Header File

Functions

audio_element_handle_t wav_encoder_init(wav_encoder_cfg_t *config)

Create a handle to an Audio Element to encode incoming data using WAV format.

Return

The audio element handle

Parameters
  • config: The configuration

Structures

struct wav_encoder_cfg_t

WAV Encoder configurations.

Public Members

int out_rb_size

Size of output ringbuffer

int task_stack

Task stack size

int task_core

Task running in core (0 or 1)

int task_prio

Task priority (based on freeRTOS priority)

bool stack_in_ext

Try to allocate stack in external memory

Macros

WAV_ENCODER_TASK_STACK
WAV_ENCODER_TASK_CORE
WAV_ENCODER_TASK_PRIO
WAV_ENCODER_RINGBUFFER_SIZE
DEFAULT_WAV_ENCODER_CONFIG()