Expand Minimize

IXAudio2VoiceCallback interface

The IXAudio2VoiceCallback interface contains methods that notify the client when certain events happen in a given IXAudio2SourceVoice.

This interface should be implemented by the XAudio2 client. XAudio2 calls these methods through an interface pointer provided by the client in the IXAudio2::CreateSourceVoice method. Methods in this interface return void, rather than an HRESULT.

See the XAudio2 Callbacks topic for restrictions on callback implementation.

Members

The IXAudio2VoiceCallback interface inherits from the IUnknown interface. IXAudio2VoiceCallback also has these types of members:

Methods

The IXAudio2VoiceCallback interface has these methods.

MethodDescription
OnBufferEnd

Called when the voice finishes processing a buffer.

OnBufferStart

Called when the voice is about to start processing a new audio buffer.

OnLoopEnd

Called when the voice reaches the end position of a loop.

OnStreamEnd

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

OnVoiceError

Called when a critical error occurs during voice processing.

OnVoiceProcessingPassEnd

Called just after the processing pass for the voice ends.

OnVoiceProcessingPassStart

Called during each processing pass for each voice, just before XAudio2 reads data from the voice's buffer queue.

 

Remarks

Platform Requirements

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

Requirements

Header

Xaudio2.h

Library

Xaudio2.lib

See also

XAudio2 Interfaces
XAudio2 Callbacks
How to: Use Source Voice Callbacks
How to: Stream a Sound from Disk

 

 

Community Additions

ADD
Show:
© 2014 Microsoft