Share via


IDirectSoundCaptureFXAec8::GetStatus Method

[The feature associated with this page, DirectSound, is a legacy feature. It has been superseded by WASAPI and Audio Graphs. Media Casting have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Media Casting instead of DirectSound, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The IDirectSoundCaptureFXAec8::GetStatus method retrieves the status of the effect.

Syntax

HRESULT GetStatus(
         PDWORD pdwStatus
)

Parameters

  • pdwStatus
    Address of a DWORD variable to receive the status. The following flags are defined. See Remarks.
    Constant Value
    DSCFX_AEC_STATUS_HISTORY_UNINITIALIZED 0x0
    DSCFX_AEC_STATUS_HISTORY_CONTINUOUSLY_CONVERGED 0x1
    DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED 0x2
    DSCFX_AEC_STATUS_CURRENTLY_CONVERGED 0x8

Return Value

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following values.

Return code
DSERR_INVALIDPARAM
DSERR_OUTOFMEMORY

Remarks

Ee418190.note(en-us,VS.85).gifWindows

Important Note for Windows Vista

Existing applications that access Windows XP Acoustic Echo Cancellation (AEC) features via the DirectSound API will no longer obtain AEC when running on Windows Vista. These applications will still run, but their calls to AEC-specific DirectSound API calls will have no effect on the captured audio.

To learn how to obtain AEC in Windows Vista, See the Windows Vista AEC topics in the Windows SDK.

The three least significant bits in *pdwStatus describe the convergence history; that is, the success of the effect in canceling the echo. The convergence history can be used by the application to determine if the algorithm has converged and remained in the converged state since it started processing data.

Initially, the AEC algorithm sets the three lower bits to 0 for the uninitialized state (DSCFX_AEC_STATUS_HISTORY_UNINITIALIZED). When the AEC algorithm has converged, the convergence history is switched to the DSCFX_AEC_STATUS_HISTORY_CONTINUOUSLY_CONVERGED state. If the AEC algorithm ever loses convergence, the convergence history is then transitioned to the DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED state. A transition from DSCFX_AEC_STATUS_HISTORY_UNINITIALIZED to DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED is also possible. The convergence history remains in the DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED state until the algorithm is reset or timely data is no longer arriving on the capture or render stream.

Requirements

Header: Declared in DSound.h.

Library: Use Dsdmo.dll.

See Also

IDirectSoundCaptureFXAec8