Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IXAudio2VoiceCallback::OnStreamEnd method

Called when the voice has just finished playing a contiguous audio stream.

Syntax


virtual void OnStreamEnd() = 0;

Parameters

This method has no parameters.

Return value

This method does not return a value.

Remarks

OnStreamEnd is triggered when XAudio2 processes an XAUDIO2_BUFFER with the XAUDIO2_END_OF_STREAM flag set. See the IXAudio2SourceVoice::SubmitSourceBuffer method for more information.

The OnStreamEnd callback indicates that XAudio2 has finished consuming the last buffer submitted to the voice. With PCM data, all audio is guaranteed to have been played and the voice can be stopped or destroyed safely.

The OnStreamEnd callback only indicates that an XAUDIO2_BUFFER with the XAUDIO2_END_OF_STREAM flag set has been processed. The callback is strictly informational and does not change the state of the source voice that triggered it. A voice stays in the start state until IXAudio2SourceVoice::Stop is called and will continue to play submitted source buffers and to trigger additional callbacks.

OnStreamEnd is guaranteed to be called just after the last byte of the current buffer has been consumed.

For information about IXAudio2VoiceCallback interface methods, see the XAudio2 Callbacks topic.

Platform Requirements

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

Requirements

Header

Xaudio2.h

See also

IXAudio2VoiceCallback
XAudio2 Callbacks
How to: Use Source Voice Callbacks

 

 

Show:
© 2017 Microsoft