Gets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice.
public:
void GetOutputMatrix(
IXAudio2Voice *pDestinationVoice,
UINT32 SourceChannels,
UINT32 DestinationChannels,
float *pLevelMatrix
)
pDestinationVoice
Type: IXAudio2Voice *
[in, optional] Pointer specifying the destination IXAudio2Voice to retrieve the output matrix for.
Note
If the voice sends to a single target voice then specifying NULL will cause GetOutputMatrix to operate on that target voice.
SourceChannels
Type: UINT32
Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain.
DestinationChannels
Type: UINT32
Confirms the input channel count of the destination voice.
pLevelMatrix
Type: float *
[out] Array of [SourceChannels * DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is returned in the form pLevelMatrix[DestinationChannels x S + D]. See Remarks for more information on volume levels.
This method applies only to source and submix voices, because mastering voices write directly to the device with no matrix mixing. Volume levels are expressed as floating-point amplitude multipliers between -224 to 224, with a maximum gain of 144.5 dB. A volume level of 1 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio’s phase. See XAudio2 Volume and Pitch Control for additional information on volume control.
See WAVEFORMATEXTENSIBLE for information on standard channel ordering.
Note
GetOutputMatrix always returns the levels most recently set by IXAudio2Voice::SetOutputMatrix. However, they may not actually be in effect yet: they only take effect the next time the audio engine runs after the IXAudio2Voice::SetOutputMatrix call (or after the corresponding IXAudio2::CommitChanges call, if IXAudio2Voice::SetOutputMatrix was called with a deferred operation ID).
Header: Declared in xaudio2.h.
Library: Use xaudio2.lib.