|
Wave Arts VQE
1.00
Voice Quality Enhancement
|
Latency calibration host object. More...
#include <AecObjects.h>
Public Member Functions | |
| AecLatCalObject (AecLatCalParam *param, AecProcessor *aec) | |
| Constructor. | |
| ~AecLatCalObject () | |
| destructor | |
| void | Process (float *refBuf, float *recBuf, int n) |
| Process AEC samples. | |
| void | Reset (bool isHard) |
| Reset AEC. | |
| AecLatCal * | GetLatCal () |
| Get the embedded AecLatCal object. | |
| bool | GetLatency (int *pLatency) |
| Get the measured latency, return T/F if valid. | |
Protected Attributes | |
| AecLatCal * | latCal |
| AecLatCal object. | |
| AecProcessor * | aec |
| AEC processor to run after latency measurement complete. | |
| bool | isComplete |
| measurement was completed | |
| int | latency |
| measured latency | |
Latency calibration host object.
This measures latency, notifies the AEC processor, and then passes processing along to the AEC processor.
| AecLatCalObject::AecLatCalObject | ( | AecLatCalParam * | param, |
| AecProcessor * | aec | ||
| ) |
Constructor.
| [in] | param | latency calibration parameters |
| [in] | aec | AEC processor object |
| void AecLatCalObject::Process | ( | float * | refBuf, |
| float * | recBuf, | ||
| int | n | ||
| ) | [virtual] |
Process AEC samples.
| [in] | refBuf | reference (far) signal buffer |
| [in,out] | recBuf | record (near) signal buffer, replaced |
| [in] | n | number 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.
Implements AecProcessor.
| void AecLatCalObject::Reset | ( | bool | isHard | ) | [virtual] |
Reset AEC.
| [in] | isHard | true 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.
Implements AecProcessor.
1.7.5.1