Share via


XACT3DCalculate

XACT3DCalculate

Calculates 3D positional audio information between an X3DAUDIO_LISTENER and an X3DAUDIO_EMITTER.

  HRESULT 
  XACT3DCalculate(
  X3DAUDIO_HANDLE X3DInstance,
  const X3DAUDIO_LISTENER *pListener,
  X3DAUDIO_EMITTER *pEmitter,
  X3DAUDIO_DSP_SETTINGS *pDSPSettings
);

Parameters

  • X3DInstance
    [in] X3DAudio instance, returned from XACT3DInitialize.
  • pListener
    [in] Pointer to an X3DAUDIO_LISTENER structure that contains the point of 3D audio reception.
  • pEmitter
    [in] Pointer to an X3DAUDIO_EMITTER that describes the 3D audio source.
  • pDSPSettings
    [out] Pointer to an X3DAUDIO_DSP_SETTINGS that receives calculation results, applied to an XACT cue via XACT3DApply.

Return Values

Returns S_OK if successful, an error code otherwise.

Remarks

XACT3DInitialize must be called before calling XACT3DCalculate.

This function can be used only with the IXACTEngine interface methods. XACT3DCalculate does not work with the flat XACT functions.

If the pChannelAzimuths member of pEmitter is set to NULL, XACT will automatically calculate the azimuth values of the emitter if the number of channels is 2, 3, 4, 6, or 8. Otherwise, the function will fail.

Requirements

Header: Declared in Xact3d.h.

See Also

XACT Functions