IXAudio2Voice::SetOutputVoices method (xaudio2.h)

Designates a new set of submix or mastering voices to receive the output of the voice.

Syntax

\\HRESULT SetOutputVoices(
  [in] const XAUDIO2_VOICE_SENDS *pSendList
);

Parameters

[in] pSendList

Array of XAUDIO2_VOICE_SENDS structure pointers to destination voices. If pSendList is NULL, the voice will send its output to the current mastering voice. To set the voice to not send its output anywhere set the OutputCount member of XAUDIO2_VOICE_SENDS to 0. All of the voices in a send list must have the same input sample rate, see XAudio2 Sample Rate Conversions for additional information.

Return value

Returns S_OK if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

Remarks

This method is only valid for source and submix voices. Mastering voices can not send audio to another voice.

After calling SetOutputVoices a voice's current send levels will be replaced by a default send matrix. The IXAudio2Voice::SetOutputMatrix method must be called to set a custom matrix for the new sendlist.

It is invalid to call SetOutputVoices from within a callback (that is, IXAudio2EngineCallback or IXAudio2VoiceCallback). If SetOutputVoices is called within a callback, it returns XAUDIO2_E_INVALID_CALL.

Note  Calling SetOutputVoices invalidates any send matrices previously set with IXAudio2Voice::SetOutputMatrix.
 

Platform Requirements

Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)

Requirements

Requirement Value
Target Platform Windows
Header xaudio2.h

See also

IXAudio2Voice