XCORE SDK
XCORE Software Development Kit
ic_api.h
1 // Copyright 2022 XMOS LIMITED.
2 // This Software is subject to the terms of the XMOS Public Licence: Version 1.
3 #ifndef IC_API_H
4 #define IC_API_H
5 
6 #include <stdio.h>
7 #include <string.h>
8 #include "xs3_math.h"
9 #include "bfp_math.h"
10 #include "ic_state.h"
11 void ic_init(ic_state_t *state);
34 
35 
56 void ic_filter(ic_state_t *state,
57  int32_t y_data[IC_FRAME_ADVANCE],
58  int32_t x_data[IC_FRAME_ADVANCE],
59  int32_t output[IC_FRAME_ADVANCE]);
60 
74 void ic_adapt(ic_state_t *state,
75  uint8_t vad,
76  int32_t output[IC_FRAME_ADVANCE]);
77 
78 
79 
80 #ifdef __XC__
81 #error PLEASE CALL IC FROM C TO AVOID STRUCT INCOMPATIBILITY ISSUES
82 #endif
83 
84 #endif //IC_API_H
#define IC_FRAME_ADVANCE
IC new samples frame size This is the number of samples of new data that the IC works on every frame....
Definition: ic_defines.h:126
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.
void ic_init(ic_state_t *state)
Initialise IC data structures and set parameters according to ic_defines.h.
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.
IC state structure.
Definition: ic_state.h:133