XCORE SDK
XCORE Software Development Kit
|
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... | |
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.
[in,out] | state | pointer to IC state structure |
[in] | vad | VAD probability between 0 (0% VAD probability) and 255 (100% VAD probability) |
[in] | output | array reference to previously filtered output samples |
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.
[in,out] | state | pointer to IC state structure |
[in,out] | y_data | array reference of mic 0 input buffer. Modified during call |
[in] | x_data | array reference of mic 1 input buffer |
[out] | output | array reference containing IC processed output buffer |
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.
[in,out] | state | pointer to IC state structure |