IXAudio2SourceVoice interface

Use a source voice to submit audio data to the XAudio2 processing pipeline.You must send voice data to a mastering voice to be heard, either directly or through intermediate submix voices.


The IXAudio2SourceVoice interface has these methods.

Method Description
IXAudio2SourceVoice::Discontinuity Notifies an XAudio2 voice that no more buffers are coming after the last one that is currently in its queue.
IXAudio2SourceVoice::FlushSourceBuffers Removes all pending audio buffers from the voice queue.
IXAudio2SourceVoice::GetFrequencyRatio Returns the frequency adjustment ratio of the voice.
IXAudio2SourceVoice::SetSourceSampleRate Reconfigures the voice to consume source data at a different sample rate than the rate specified when the voice was created.
IXAudio2SourceVoice::ExitLoop Stops looping the voice when it reaches the end of the current loop region.
IXAudio2SourceVoice::GetState Returns the voice's current cursor position data.
IXAudio2SourceVoice::SetFrequencyRatio Sets the frequency adjustment ratio of the voice.
IXAudio2SourceVoice::Start Starts consumption and processing of audio by the voice. Delivers the result to any connected submix or mastering voices, or to the output device.
IXAudio2SourceVoice::Stop Stops consumption of audio by the current voice.
IXAudio2SourceVoice::SubmitSourceBuffer Adds a new audio buffer to the voice queue.


Platform Requirements

Windows 10 (XAudio2.9); Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)


Target Platform Windows
Header xaudio2.h

See also

How to: Change Voice Pitch

How to: Stream a Sound from Disk

How to: Use Source Voice Callbacks


XAudio2 Interfaces