Microsoft DirectX 8.1 (C++)

Capture Buffer Effects

Two capture buffer effects are available as kernel mode implementations on Microsoft® Windows® XP Home Edition and Windows XP Professional and later operating systems:

Both the DirectSoundFullDuplexCreate8 function and the IDirectSoundCapture8::CreateCaptureBuffer method take as a parameter a DSCBUFFERDESC structure that points to an array of DSCEFFECTDESC structures describing desired effects. However, to use the Microsoft implementations you must create the capture buffer by using DirectSoundFullDuplexCreate8.

In the dwFlags member for each DSCEFFECTDESC structure, you must specify either DSCFX_LOCHARDWARE or DSCFX_LOCSOFTWARE. In most cases, specify DSCFX_LOCSOFTWARE. Buffer creation fails if the effect is not available in the specified location.

The effect is identified in the guidDSCFXClass member of the DSCEFFECTDESC structure. To obtain the Microsoft software implementation, specify DSCFX_MS_AEC or DSCFX_MS_NS in the guidDSCFXInstance member. To use another implementation available in hardware or software, obtain the class and instance GUID from the manufacturer.

After the buffer has been created, you can retrieve information about the effects by using the IDirectSoundCaptureBuffer8::GetFXStatus method.

Acoustic echo cancellation (AEC) is primarily of interest for applications that use voice communication from one site to another. Without echo cancellation, the signal from a microphone at site A is output from the speakers at site B, picked up by the microphone at site B, and rebroadcast at site A, possibly resulting in a feedback loop. AEC overcomes this problem by monitoring the incoming signal, adjusting it to take the room environment into account, and then removing it from the outgoing signal.

AEC has the following limitations:

Use the IDirectSoundCaptureFXAec8·interface to set and retrieve AEC parameters on a capture buffer that contains this effect. You can also enable noise fill, which is a means of preventing complete silence when there is no new data in the outgoing signal.

Noise suppression can be applied only if AEC is also enabled. The noise suppression capture effect removes constant background noise, such as fan noise. Use the IDirectSoundCaptureFXNoiseSuppress8 interface to set and retrieve parameters.

The effect interfaces are obtained from the capture buffer object by using IDirectSoundCaptureBuffer8::GetObjectInPath.