X3DAudioInitialize

Sets all global 3D audio constants.

Syntax

HRESULT X3DAudioInitialize(
         UINT32 SpeakerChannelMask,
         FLOAT32 SpeedOfSound,
         X3DAUDIO_HANDLE Instance
)  

Parameters

SpeakerChannelMask
Type: UINT32 

Assignment of channels to speaker positions. Permissible values are defined in x3daudio.h. The value must not be 0. The SPEAKER_7POINT1_SURROUND value is recommended for panning through the full speaker space exposed by Xbox One audio endpoints. This space corresponds to the actual expected speaker positions in a listening environment.

SpeedOfSound
Type: FLOAT32 

Speed of sound, in user-defined world units per second. Use this value only for doppler calculations. It must be greater than or equal to FLT_MIN.

Instance
Type: X3DAUDIO_HANDLE 

[out] 3D audio instance handle. Use this handle when you call X3DAudioCalculate.

Return value

Type: HRESULT 

See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

Remarks

X3DAUDIO_HANDLE is an opaque data structure. Because the operating system doesn’t allocate any additional storage for the 3D audio instance handle, you don’t need to free or close it.

Requirements

Header: Declared in x3daudio.h.

Library: Use xaudio2.lib.