X3DAudioCalculate function

Calculates DSP settings with respect to 3D parameters.

Syntax

X3DAUDIO_API_(void) X3DAudioCalculate(
  const X3DAUDIO_HANDLE   Instance,
  const X3DAUDIO_LISTENER *pListener,
  const X3DAUDIO_EMITTER  *pEmitter,
  UINT32                  Flags,
  X3DAUDIO_DSP_SETTINGS   *pDSPSettings
);

Parameters

Instance

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

pListener

Pointer to an X3DAUDIO_LISTENER representing the point of reception.

pEmitter

Pointer to an X3DAUDIO_EMITTER representing the sound source.

Flags

Value Description
X3DAUDIO_CALCULATE_MATRIX Enables matrix coefficient table calculation. 
X3DAUDIO_CALCULATE_DELAY Enables delay time array calculation (stereo only). 
X3DAUDIO_CALCULATE_LPF_DIRECT Enables low pass filter (LPF) direct-path coefficient calculation. 
X3DAUDIO_CALCULATE_LPF_REVERB Enables LPF reverb-path coefficient calculation. 
X3DAUDIO_CALCULATE_REVERB Enables reverb send level calculation. 
X3DAUDIO_CALCULATE_DOPPLER Enables Doppler shift factor calculation. 
X3DAUDIO_CALCULATE_EMITTER_ANGLE Enables emitter-to-listener interior angle calculation. 
X3DAUDIO_CALCULATE_ZEROCENTER Fills 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

Pointer to an X3DAUDIO_DSP_SETTINGS structure that receives the calculation results.

Return Value

This function does not return a value.

Remarks

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.

Requirements

   
Target Platform Windows
Header x3daudio.h
Library Xaudio2.lib

See Also

Functions