XCORE SDK
XCORE Software Development Kit
|
Functions | |
void | adec_init (adec_state_t *state, adec_config_t *config) |
Initialise ADEC data structures. More... | |
void | adec_process_frame (adec_state_t *state, adec_output_t *adec_output, const adec_input_t *adec_in) |
Perform ADEC processing on an input frame of data. More... | |
void | adec_estimate_delay (de_output_t *de_output, const bfp_complex_s32_t *H_hat, unsigned num_phases) |
Estimate microphone delay. More... | |
void adec_estimate_delay | ( | de_output_t * | de_output, |
const bfp_complex_s32_t * | H_hat, | ||
unsigned | num_phases | ||
) |
Estimate microphone delay.
This function measures the microphone signal delay wrt the reference signal. It does so by looking for the phase with the peak energy among all AEC filter phases and uses the peak energy phase index as the estimate of the microphone delay. Along with the measured delay, it also outputs information about the peak phase energy that can then be used to guage the AEC filter convergence and the reliability of the measured delay.
[out] | de_state | Delay estimator output structure |
[in] | H_hat | bfp_complex_s32_t array storing the AEC filter spectrum |
[in] | Number | of phases in the AEC filter |
void adec_init | ( | adec_state_t * | state, |
adec_config_t * | config | ||
) |
Initialise ADEC data structures.
This function initialises ADEC state for a given configuration. It must be called at startup to initialise the ADEC data structures before processing any frames, and can be called at any time after that to reset the ADEC instance, returning the internal ADEC state to its defaults.
[out] | state | Pointer to ADEC state structure |
[in] | config | Pointer to ADEC configuration structure. |
void adec_process_frame | ( | adec_state_t * | state, |
adec_output_t * | adec_output, | ||
const adec_input_t * | adec_in | ||
) |
Perform ADEC processing on an input frame of data.
This function takes information about the latest AEC processed frame and the latest measured delay estimate as input, and decides if a delay correction between input microphone and reference signals is required. If a correction is needed, it outputs a new requested input delay, optionally accompanied with a request for AEC restart in a different configuration. It updates the internal ADEC state structure to reflect the current state of the ADEC process.
[in,out] | state | ADEC internal state structure |
[out] | adec_output | ADEC output structure |
[in] | adec_in | ADEC input structure |