X3DAUDIO_EMITTER
Defines a single or multi-point 3D audio source used with an arbitrary number of sound channels.
typedef struct X3DAUDIO_EMITTER {
X3DAUDIO_CONE *pCone;
X3DAUDIO_VECTOR OrientFront;
X3DAUDIO_VECTOR OrientTop;
X3DAUDIO_VECTOR Position;
X3DAUDIO_VECTOR Velocity;
UINT32 ChannelCount;
FLOAT32 ChannelRadius;
FLOAT32 *pChannelAzimuths;
X3DAUDIO_DISTANCE_CURVE *pVolumeCurve;
X3DAUDIO_DISTANCE_CURVE *pLFECurve;
X3DAUDIO_DISTANCE_CURVE *pLPFDirectCurve;
X3DAUDIO_DISTANCE_CURVE *pLPFReverbCurve;
X3DAUDIO_DISTANCE_CURVE *pReverbCurve;
FLOAT32 CurveDistanceScaler;
FLOAT32 DopplerScaler;
} X3DAUDIO_EMITTER, *LPX3DAUDIO_EMITTER;
Members
- pCone
- Pointer to a sound cone, used only with single-channel non-LFE emitters.
- OrientFront
- Orientation of the front direction. This value must be orthonormal with OrientTop.
- OrientTop
- Orientation of the top direction. This value must be orthonormal with OrientFront.
- Position
- Position in user-defined world units. This value does not affect Velocity.
- Velocity
- Velocity vector in user-defined world units/second. This value is used only for doppler calculations and does not affect Position.
- ChannelCount
- Number of sound channels. Cannot be 0.
- ChannelRadius
- Channel radius (must be greater than or equal to 0.0f).
- pChannelAzimuths
- Position of channel expressed as an azimuth in radians along the channel radius with respect to
the front orientation vector in the plane orthogonal to the top orientation vector, or X3DAUDIO_2PI to
specify a LFE channel. This value must be within 0.0f to X3DAUDIO_2PI.
- pVolumeCurve
- Volume roll-off distance curve, or NULL to use default curve: [0.0f, 1.0f], [1.0f, 0.0f].
- pLFECurve
- LFE roll-off distance curve, or NULL to use default curve: [0.0f, 1.0f], [1.0f, 0.0f].
- pLPFDirectCurve
- LPF direct-path coefficient distance curve, or NULL to use default curve: [0.0f, 0.0f], [1.0f, 1.0f].
- pLPFReverbCurve
- LPF reverb-path coefficient distance curve, or NULL to use default curve: [0.0f, 0.25f], [1.0f, 0.25f].
- pReverbCurve
- Reverb send level distance curve, or NULL to use default curve: [0.0f, 1.0f], [1.0f, 0.0f].
- CurveDistanceScaler
- Curve distance scaler used to scale normalized distance curves to user-defined world units and/or exaggerate their effect. This does not affect any other calculations. The value must be within the range FLT_MIN to FLT_MAX.
- DopplerScaler
- Doppler shift scaler used to exaggerate doppler shift effect. This does not affect any other calculations. The value must be within 0.0f to FLT_MAX.
Remarks
The parameter type X3DAUDIO_VECTOR is typed to D3DVECTOR, to provide x, y, and z floating-point values.
X3DAudio uses a left-handed Cartesian coordinate system with values on the x-axis increasing from left to right, on the y-axis from bottom to top, and on the z-axis from near to far. Azimuths are measured clockwise from a given reference direction.
For user-defined distance curves, the distance field of the first point must be 0.0f and the distance field of the last point must be 1.0f.
If an emitter moves beyond a distance of (CurveDistanceFactor * 1.0f), the last point in the curve will be used to compute the volume output level. The last point is determined by the following:
X3DAUDIO_DISTANCE_CURVE.pPoints[PointCount-1].DSPSetting)
Requirements
Header: Declared in X3daudio.h.
See Also
X3DAudio Structures