spandsp 0.0.6
modem_echo.c File Reference
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
#include "floating_fudge.h"
#include "spandsp/telephony.h"
#include "spandsp/bit_operations.h"
#include "spandsp/dc_restore.h"
#include "spandsp/modem_echo.h"
#include "spandsp/private/modem_echo.h"

Functions

void modem_echo_can_free (modem_echo_can_state_t *ec)
 
modem_echo_can_state_tmodem_echo_can_init (int len)
 
void modem_echo_can_flush (modem_echo_can_state_t *ec)
 
void modem_echo_can_adaption_mode (modem_echo_can_state_t *ec, int adapt)
 
int16_t modem_echo_can_update (modem_echo_can_state_t *ec, int16_t tx, int16_t rx)
 

Function Documentation

◆ modem_echo_can_adaption_mode()

void modem_echo_can_adaption_mode ( modem_echo_can_state_t ec,
int  adapt 
)

Set the adaption mode of a modem echo canceller context.

Parameters
ecThe echo canceller context.
adaptThe mode.

◆ modem_echo_can_flush()

void modem_echo_can_flush ( modem_echo_can_state_t ec)

Flush (reinitialise) a modem echo canceller context.

Parameters
ecThe echo canceller context.

References modem_echo_can_state_s::fir_taps16, and modem_echo_can_state_s::fir_taps32.

◆ modem_echo_can_free()

void modem_echo_can_free ( modem_echo_can_state_t ec)

Free a modem echo canceller context.

Parameters
ecThe echo canceller context.

References modem_echo_can_state_s::fir_taps16, and modem_echo_can_state_s::fir_taps32.

◆ modem_echo_can_init()

modem_echo_can_state_t * modem_echo_can_init ( int  len)

Create a modem echo canceller context.

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

◆ modem_echo_can_update()

int16_t modem_echo_can_update ( modem_echo_can_state_t ec,
int16_t  tx,
int16_t  rx 
)

Process a sample through a modem echo canceller.

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