X3DAUDIO_DSP_SETTINGS
Receives the results from a call to X3DAudioCalculate to be sent to the low-level audio rendering function for 3D signal processing.
typedef struct X3DAUDIO_DSP_SETTINGS {
FLOAT32 *pMatrixCoefficients;
FLOAT32 *pDelayTimes;
UINT32 SrcChannelCount;
UINT32 DstChannelCount;
FLOAT32 LPFDirectCoefficient;
FLOAT32 LPFReverbCoefficient;
FLOAT32 ReverbLevel;
FLOAT32 DopplerFactor;
FLOAT32 EmitterToListenerAngle;
FLOAT32 EmitterToListenerDistance;
FLOAT32 EmitterVelocityComponent;
FLOAT32 ListenerVelocityComponent;
} X3DAUDIO_DSP_SETTINGS, *LPX3DAUDIO_DSP_SETTINGS;
Members
- pMatrixCoefficients
- Matrix coefficient table. This is an array representing the volume level of each source channel present in each destination channel, with the source channels being the column index and the destination channels being the row index of the table. It must have at least (SrcChannelCount × DstChannelCount) elements.
For example, when rendering two-channel stereo input into 5.1 output that is weighted toward the front channels—but is absent from the center and low-frequency channels—the matrix might be as shown in the following table.
Output |
Left Input |
Right Input |
Left |
1.0 |
0.0 |
Right |
0.0 |
1.0 |
Front Center |
0.0 |
0.0 |
LFE |
0.0 |
0.0 |
Rear Left |
0.8 |
0.0 |
Rear Right |
0.0 |
0.8 |
Note that the left and right channels are fully mapped to the output left and right channels; 80 percent of the left and right input is mapped to the rear left and right channels.
- pDelayTimes
- Delay time array, which receives delays for each destination channel in milliseconds. This array must have at least DstChannelCount elements. X3DAudio doesn't actually perform the delay. It simply returns the coefficients that may be used to adjust a delay DSP effect placed in the effect chain.
Note This member is only returned when X3DAudio is initialized for stereo output. For typical Xbox 360 usage, it will not return any data at all.
- SrcChannelCount
- Number of source channels. This must match the number of channels on the respective emitter.
- DstChannelCount
- Number of destination channels. This must match what was passed into X3DAudioInitialize or XACT3DCalculate for the speaker channel mask. For SPEAKER_STEREO, the value must be 2. For SPEAKER_5POINT1, the value must be 6 (5 speakers + LFE).
- LPFDirectCoefficient
- LPF direct-path coefficient.
- LPFReverbCoefficient
- LPF reverb-path coefficient.
- ReverbLevel
- Reverb send level.
- DopplerFactor
- Doppler shift factor. Scales the resampler ratio for Doppler shift effect, where:
effective_frequency = DopplerFactor × original_frequency
- EmitterToListenerAngle
- The emitter-to-listener interior angle, expressed in radians with respect to the emitter's front orientation.
- EmitterToListenerDistance
- Distance in user-defined world units from the listener to the emitter base position.
- EmitterVelocityComponent
- Component of emitter velocity vector projected onto emitter-to-listener vector in user-defined world units per second. Calculated only for Doppler.
- ListenerVelocityComponent
- Component of listener velocity vector projected onto the emitter->listener vector in user-defined world units per second. Calculated only for Doppler.
Remarks
The following members must be initialized before passing this structure to the X3DAudioCalculate function:
- pMatrixCoefficients
- pDelayTimes
- SrcChannelCount
- DstChannelCount
The following members are returned by passing this structure to the X3DAudioCalculate function:
- pMatrixCoefficients
- pDelayTimes
- LPFDirectCoefficient
- LPFReverbCoefficient
- ReverbLevel
- DopplerFactor
- EmitterToListenerDistance
- EmitterToListenerAngle
- EmitterVelocityComponent
- ListenerVelocityComponent
Note For pMatrixCoefficients and pDelayTimes, X3DAudioCalculate does not allocate additional memory. X3DAudioCalculate merely modifies the values at the memory locations allocated for these pointers.
Requirements
Header: Declared in X3daudio.h.
See Also
X3DAudio Structures