X3DAUDIO_LISTENER Structure

Defines a point of 3D audio reception.

Syntax

typedef struct X3DAUDIO_LISTENER {
    X3DAUDIO_VECTOR OrientFront;
    X3DAUDIO_VECTOR OrientTop;
    X3DAUDIO_VECTOR Position;
    X3DAUDIO_VECTOR Velocity;
    X3DAUDIO_CONE *pCone;
} X3DAUDIO_LISTENER, *LPX3DAUDIO_LISTENER;  

Members

OrientFront
Orientation of front direction. When pCone is NULL OrientFront is used only for matrix and delay calculations. When pCone is not NULL OrientFront is used for matrix, LPF (both direct and reverb paths), and reverb calculations. This value must be orthonormal with OrientTop when used.

OrientTop
Orientation of top direction, used only for matrix and delay calculations. This value must be orthonormal with OrientFront when used.

Position
Position in user-defined world units. This value does not affect Velocity.

Velocity
Velocity vector in user-defined world units per second, used only for doppler calculations. This value does not affect Position.

pCone
Pointer to an X3DAUDIO_CONE structure for this listener. Providing a listener cone will specify that additional calculations are performed when determining the volume and filter DSP parameters for individual sound sources. A NULL pCone value specifies an omnidirectional sound and no cone processing is applied. pCone is only used for matrix, LPF (both direct and reverb paths), and reverb calculations.

Remarks

The parameter type X3DAUDIO_VECTOR is typed to DirectX::XMFLOAT3, to provide x, y and z floating-point values.

A listener’s front and top vectors must be orthonormal. To be considered orthonormal, a pair of vectors must have a magnitude of 1 +- 1x10-5 and a dot product of 0 +- 1x10-5.

Requirements

Header: Declared in x3daudio.h.

Library: Use xaudio2.lib.