Wave Arts VQE  1.00
Voice Quality Enhancement
Public Member Functions
AecProcessor Class Reference

Virtual base class for AEC algorithms. More...

#include <AecObjects.h>

Inheritance diagram for AecProcessor:
AecLatCalObject AecObject AesObject

List of all members.

Public Member Functions

virtual ~AecProcessor ()
 destructor
virtual void Process (float *refBuf, float *recBuf, int n)=0
 Process AEC samples.
virtual void Reset (bool isHard)=0
 Reset AEC.
virtual void SetLatency (int latency)
 Set I/O latency.

Detailed Description

Virtual base class for AEC algorithms.


Member Function Documentation

virtual void AecProcessor::Process ( float *  refBuf,
float *  recBuf,
int  n 
) [pure virtual]

Process AEC samples.

Parameters:
[in]refBufreference (far) signal buffer
[in,out]recBufrecord (near) signal buffer, replaced
[in]nnumber of sample frames

The AEC algorithm is called with a matched pair of reference and record signal buffers which should have a constant latency relationship, provided the sample rates are synchronized. The AEC algorithm is responsible for compensating for the latency, usually by internally delaying the reference signal. See AecProcessor::SetLatency. If the sample rates are not synchronized then the latency relationship will drift. The AecInFifo will discard or repeat a record buffer when the drift exceeds a single buffer time. This is called a buffer overrun or buffer underrun.

The recBuf buffer is replaced by the "error signal", the echo cancelled result. Note the AEC algorithm already knows the frame size and numbers of input and output channels. Hence passing the number of sample frames via n is redundant.

Implemented in AecObject, AesObject, and AecLatCalObject.

virtual void AecProcessor::Reset ( bool  isHard) [pure virtual]

Reset AEC.

Parameters:
[in]isHardtrue if hard reset, else soft reset

A hard reset resets the AEC algorithm to initial conditions. A hard reset will also cause the latency to be measured if the AecLatCalObject is used. A soft reset should be called when a signal discontinuity is detected due to lack of buffer synchronization.

Implemented in AecObject, AesObject, and AecLatCalObject.

void AecProcessor::SetLatency ( int  latency) [virtual]

Set I/O latency.

Parameters:
[in]latencyI/O latency in samples

Set the latency in samples. The AEC algorithm may compensate for latency by delaying the reference signal by this amount. It's very important not to overestimate the latency. The adaptive filter can't function if the reference is delayed so much that the echo occurs before the corresponding reference signal. It's better to underestimate the latency and allow leading zeros in the AEC response.

Reimplemented in AecObject, and AesObject.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines