- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# speex_echo.h File Reference

Echo cancellation. More...

`#include "speex/speex_types.h"`

## Defines
#define | SPEEX_ECHO_GET_FRAME_SIZE 3
#define | SPEEX_ECHO_SET_SAMPLING_RATE 24
#define | SPEEX_ECHO_GET_SAMPLING_RATE 25
## Functions
SpeexEchoState * | speex_echo_state_init (int frame_size, int filter_length)
void | speex_echo_state_destroy (SpeexEchoState *st)
void | speex_echo_cancel (SpeexEchoState *st, short *ref, short *echo, short *out, spx_int32_t *Y)
void | speex_echo_state_reset (SpeexEchoState *st)
int | speex_echo_ctl (SpeexEchoState *st, int request, void *ptr)

## Detailed Description

Echo cancellation.

## Define Documentation

#define SPEEX_ECHO_GET_FRAME_SIZE 3

Obtain frame size used by the AEC

#define SPEEX_ECHO_GET_SAMPLING_RATE 25

Get sampling rate

#define SPEEX_ECHO_SET_SAMPLING_RATE 24

Set sampling rate

## Function Documentation

void speex_echo_cancel | ( | SpeexEchoState * | st,
|  | short * | ref,
|  | short * | echo,
|  | short * | out,
|  | spx_int32_t * | Yout |
| ) |  |  |

Performs echo cancellation on a frame

int speex_echo_ctl | ( | SpeexEchoState * | st,
|  | int | request,
|  | void * | ptr |
| ) |  |  |

Used like the ioctl function to control the echo canceller parameters

Parameters:

  | state | Encoder state
  | request | ioctl-type request (one of the SPEEX_ECHO_* macros)
  | ptr | Data exchanged to-from function

Returns:
  0 if no error, -1 if request in unknown

void speex_echo_state_destroy | ( | SpeexEchoState * | st | ) |

Destroys an echo canceller state

SpeexEchoState* speex_echo_state_init | ( | int | frame_size,
|  | int | filter_length |
| ) |  |  |

Creates a new echo canceller state

void speex_echo_state_reset | ( | SpeexEchoState * | st | ) |

Resets echo canceller state