The AEC system filter (aec.sys) implements the acoustic echo cancellation (AEC) and noise suppression (NS) algorithms in software. This filter is a standard operating-system component in Windows XP and later. For information about how DirectSoundCapture applications enable use of the AEC system filter, see the Platform SDK documentation.
An audio filter graph that incorporates a capture effect that is implemented in the AEC system filter is subject to the following restrictions:

AEC System Filter: Pins and Connections
The preceding requirements apply to all kernel-streaming audio filter graphs that incorporate capture effects that are implemented in aec.sys. These restrictions reflect fundamental assumptions in the design and implementation of the AEC system filter. The constraints on stream formats might change in future versions of Windows.
Any product design that uses the AEC system filter should take the preceding constraints into account. The following questions and answers show how these constraints can affect AEC filtering behavior:
Q: I've created a DirectSound buffer for stereo rendering, but both channels sound the same when I'm using AEC. Why is this?
A: AEC works only on mono streams, so KMixer is mixing the stereo stream back to mono to meet this constraint.
Q: Why does my 44-kHz, 16-bit audio sound like 16 kHz when I use AEC?
A: Because the AEC system filter performs all internal processing at 16 kHz.
Q: Why can't I get a hardware-accelerated DirectSound buffer with AEC?
A: Because SysAudio turns off hardware-accelerated mixing when AEC is enabled.
Q: Will the AEC system filter work with my old Sound Blaster 16 card?
A: Yes. Although the Sound Blaster16 card is unable to simultaneously manage 16-bit rendering and capture streams, it can simultaneously manage an 8-bit rendering stream and a 16-bit capture stream, which is a combination that the AEC system filter's render-out and capture-in pins support. New audio cards should be designed to support bit depths of at least 16 bits for both rendering and capture.
A DirectSound application that enables the AEC system filter can choose for its DirectSound buffers any sample rate or sample size that KMixer supports. KMixer converts the data from the application's rendering buffer to a 16-kHz mono 16-bit format before it enters the AEC system filter. Similarly, KMixer can convert the data that is destined for a DirectSoundCapture application's capture buffer to a 16-kHz mono 16-bit format after it leaves the AEC system filter. However, to both minimize the amount of processing done in the graph and achieve the highest audio quality, the applications should use a 16-kHz mono 16-bit format for both the rendering and capture buffers.
If you want your audio hardware to work with the AEC system filter, then the hardware rendering pin must support at least one of the sample rates supported by the AEC render-out pin and the hardware capture pin must support one of the sample rates supported by the AEC capture-in pin. To achieve the best AEC performance, your hardware should support a 16-kHz sample rate in addition to any higher rates it supports. By supporting the 16-kHz rate, the hardware reduces the amount of processing that the AEC system filter must do by eliminating the need to do source-rate conversion.
The AEC system filter's render-in pin connects to KMixer's output pin. KMixer performs the necessary conversion of its input streams to the format that the render-in pin requires. The render-in pin supports only two data formats:
The capture-out pin supports only one format:
If the DirectSoundCapture application's buffer format is 16-kHz mono 16-bit PCM, the AEC capture-out pin can bypass KMixer and connect directly to DSound.DLL (see preceding figure). Otherwise, the AEC capture-out pin connects to KMixer, which converts the 16-kHz mono 16-bit PCM stream from the pin into whatever format the application's capture buffer uses.
The AEC render-out pin can handle any of the following formats:
The render-out pin produces a stereo stream by copying the single channel from the AEC node into both channels of the output stream.
The capture-in pin can handle any of the following formats:
The capture-in pin uses only the first channel and ignores (and discards) the others.
All of the AEC system filter's pins use the data-format parameter values shown in the following table.
| KSDATARANGE Member | Parameter Value |
|---|---|
| MajorFormat | KSDATAFORMAT_TYPE_AUDIO |
| SubFormat | KSDATAFORMAT_SUBTYPE_PCM |
| Specifier | KSDATAFORMAT_SPECIFIER_WAVEFORMATEX |
For more information on the MajorFormat, SubFormat, and Specifier members, see KSDATARANGE. For an example of a KSDATARANGE_AUDIO data-range descriptor that uses these three parameter values, see PCM Stream Data Range.