Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

X3DAudioCalculate function

Calculates DSP settings with respect to 3D parameters.


void __stdcall X3DAudioCalculate(
  _In_    const X3AUDIO_HANDLE        Instance,
  _In_    const X3DAUDIO_LISTENER     *pListener,
  _In_    const X3DAUDIO_EMITTER      *pEmitter,
  _In_          UINT32                *Flags,
  _Inout_       X3DAUDIO_DSP_SETTINGS *pDSPSettings


Instance [in]

3D audio instance handle. Call X3DAudioInitialize to get this handle.

pListener [in]

Pointer to an X3DAUDIO_LISTENER representing the point of reception.

pEmitter [in]

Pointer to an X3DAUDIO_EMITTER representing the sound source.

Flags [in]
X3DAUDIO_CALCULATE_MATRIXEnables matrix coefficient table calculation. 
X3DAUDIO_CALCULATE_DELAYEnables delay time array calculation (stereo only). 
X3DAUDIO_CALCULATE_LPF_DIRECTEnables low pass filter (LPF) direct-path coefficient calculation. 
X3DAUDIO_CALCULATE_LPF_REVERBEnables LPF reverb-path coefficient calculation. 
X3DAUDIO_CALCULATE_REVERBEnables reverb send level calculation. 
X3DAUDIO_CALCULATE_DOPPLEREnables Doppler shift factor calculation. 
X3DAUDIO_CALCULATE_EMITTER_ANGLEEnables emitter-to-listener interior angle calculation. 
X3DAUDIO_CALCULATE_ZEROCENTERFills the center channel with silence. This flag allows you to keep a 6-channel matrix so you do not have to remap the channels, but the center channel will be silent. This flag is only valid if you also set X3DAUDIO_CALCULATE_MATRIX. 
X3DAUDIO_CALCULATE_REDIRECT_TO_LFE Applies an equal mix of all source channels to a low frequency effect (LFE) destination channel. It only applies to matrix calculations with a source that does not have an LFE channel and a destination that does have an LFE channel. This flag is only valid if you also set X3DAUDIO_CALCULATE_MATRIX. 


pDSPSettings [in, out]

Pointer to an X3DAUDIO_DSP_SETTINGS structure that receives the calculation results.

Return value

This function does not return a value.


You typically call X3DAudioCalculate once for each pair of emitting objects and listeners in the scene. After each call, to apply the 3D effects, the app manually applies the calculation results at pDSPSettings to the XAUDIO2 graph. For more info, see How to: Integrate X3DAudio with XAudio2.

Important   The listener and emitter values must be valid. Floating-point specials (NaN, QNaN, +INF, -INF) can cause the entire audio output to go silent if introduced into a running audio graph.

Platform Requirements

Windows 10 (XAudio2.9); Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)

Windows Phone 8.1: This API is supported.






See also




© 2018 Microsoft