libspandsp 0.0.4

echo.h File Reference

#include "fir.h"

Go to the source code of this file.

Classes

struct  echo_can_state_t

Defines

#define NONUPDATE_DWELL_TIME   600
#define ECHO_CAN_USE_NLP   0x01
#define ECHO_CAN_USE_SUPPRESSOR   0x02
#define ECHO_CAN_USE_CNG   0x04
#define ECHO_CAN_USE_ADAPTION   0x08

Functions

echo_can_state_techo_can_create (int len, int adaption_mode)
void echo_can_free (echo_can_state_t *ec)
void echo_can_flush (echo_can_state_t *ec)
void echo_can_adaption_mode (echo_can_state_t *ec, int adaption_mode)
int16_t echo_can_update (echo_can_state_t *ec, int16_t tx, int16_t rx)

Detailed Description


Function Documentation

void echo_can_adaption_mode ( echo_can_state_t ec,
int  adaption_mode 
)

Set the adaption mode of a voice echo canceller context.

Parameters:
ecThe echo canceller context.
adaption_modeThe mode.

Referenced by echo_can_create().

echo_can_state_t* echo_can_create ( int  len,
int  adaption_mode 
)

Create a voice echo canceller context.

Parameters:
lenThe length of the canceller, in samples.
Returns:
The new canceller context, or NULL if the canceller could not be created.

References echo_can_adaption_mode(), echo_can_state_t::fir_taps16, and echo_can_state_t::fir_taps32.

void echo_can_flush ( echo_can_state_t ec)

Flush (reinitialise) a voice echo canceller context.

Parameters:
ecThe echo canceller context.

References echo_can_state_t::fir_taps16, and echo_can_state_t::fir_taps32.

void echo_can_free ( echo_can_state_t ec)

Free a voice echo canceller context.

Parameters:
ecThe echo canceller context.

References echo_can_state_t::fir_taps16, and echo_can_state_t::fir_taps32.

int16_t echo_can_update ( echo_can_state_t ec,
int16_t  tx,
int16_t  rx 
)

Process a sample through a voice echo canceller.

Parameters:
ecThe echo canceller context.
txThe transmitted audio sample.
rxThe received audio sample.
Returns:
The clean (echo cancelled) received sample.

References echo_can_state_t::fir_taps16, and echo_can_state_t::fir_taps32.