echo.c File Reference

#include <stdlib.h>
#include <unistd.h>
#include <inttypes.h>
#include <string.h>
#include <stdio.h>
#include "spandsp/alaw_ulaw.h"
#include "spandsp/echo.h"
#include "spandsp/mmx.h"

Defines

#define NULL   (void *) 0
#define FALSE   0
#define TRUE   (!FALSE)
#define MIN_TX_POWER_FOR_ADAPTION   64*64
#define MIN_RX_POWER_FOR_ADAPTION   64*64

Functions

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

Variables

int sample_no = 0

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:
ec The echo canceller context.
adapt The mode.

echo_can_state_t* echo_can_create ( int  len,
int  adaption_mode 
)

Create a voice echo canceller context.

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

void echo_can_flush ( echo_can_state_t ec  ) 

Flush (reinitialise) a voice echo canceller context.

Parameters:
ec The echo canceller context.

void echo_can_free ( echo_can_state_t ec  ) 

Free a voice echo canceller context.

Parameters:
ec The echo canceller context.

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:
ec The echo canceller context.
tx The transmitted audio sample.
rx The received audio sample.
Returns:
The clean (echo cancelled) received sample.


Generated on Fri Nov 10 09:40:24 2006 for libspandsp by  doxygen 1.5.1