|Microsoft DirectX 9.0|
Two capture buffer effects are available as kernel mode implementations on Microsoft® Windows® XP:
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. You must also play the secondary sound buffer created by that function; until you do so, the effects are not applied.
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. The signal from a microphone at site A is output from the speakers at site B and picked up by the microphone at site B. Without AEC, the signal is then sent back to site A, resulting in an echo and possibly a feedback squeal. AEC overcomes this problem by monitoring the incoming signal at each site, adjusting it to take the room environment into account, and then removing it from the outgoing signal. It also removes any local sounds being played by the computer, such as music, so that these do not interfere with the voice signal being sent over the network.
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.