XCORE SDK
XCORE Software Development Kit
Functions
High Level API Functions

Functions

void ic_init (ic_state_t *state)
 Initialise IC data structures and set parameters according to ic_defines.h. More...
 
void ic_filter (ic_state_t *state, int32_t y_data[IC_FRAME_ADVANCE], int32_t x_data[IC_FRAME_ADVANCE], int32_t output[IC_FRAME_ADVANCE])
 Filter one frame of audio data inside the IC. More...
 
void ic_adapt (ic_state_t *state, uint8_t vad, int32_t output[IC_FRAME_ADVANCE])
 Adapts the IC filter according to previous frame's statistics and VAD input. More...
 

Detailed Description

Function Documentation

◆ ic_adapt()

void ic_adapt ( ic_state_t state,
uint8_t  vad,
int32_t  output[IC_FRAME_ADVANCE] 
)

Adapts the IC filter according to previous frame's statistics and VAD input.

This function should be called after each call to ic_filter. Filter and adapt functions are seprated so that the external VAD function can operate on that frame's filtered samples.

Parameters
[in,out]statepointer to IC state structure
[in]vadVAD probability between 0 (0% VAD probability) and 255 (100% VAD probability)
[in]outputarray reference to previously filtered output samples

◆ ic_filter()

void ic_filter ( ic_state_t state,
int32_t  y_data[IC_FRAME_ADVANCE],
int32_t  x_data[IC_FRAME_ADVANCE],
int32_t  output[IC_FRAME_ADVANCE] 
)

Filter one frame of audio data inside the IC.

This should be called once per new frame of IC_FRAME_ADVANCE samples. The y_data array contains the microphone data that is to have the noise subtracted from it and x_data is the noise reference source which is internally delayed before being fed into the adaptive filter. Note that the y_data input array is internally delayed by the call to ic_filter() and so contains the delayed y_data afterwards. Typically it does not matter which mic channel is connected to x or y_data as long as the separation is appropriate. The performance of this filter has been optimised for a 71mm mic separation distance.

Parameters
[in,out]statepointer to IC state structure
[in,out]y_dataarray reference of mic 0 input buffer. Modified during call
[in]x_dataarray reference of mic 1 input buffer
[out]outputarray reference containing IC processed output buffer

◆ ic_init()

void ic_init ( ic_state_t state)

Initialise IC data structures and set parameters according to ic_defines.h.

This is the first function that must called after creating an ic_state_t instance.

Parameters
[in,out]statepointer to IC state structure