IXAudio2VoiceCallback::OnBufferEnd Method

Called when the voice finishes processing a buffer.

Syntax

public:
void OnBufferEnd(
         void *pBufferContext
)  

Parameters

pBufferContext
Type: void *

Context pointer assigned to the pContext member of the XAUDIO2_BUFFER structure when the buffer was submitted.

Return value

None.

Remarks

After an OnBufferEnd callback the audio memory for the buffer associated with pBufferContext can safely be released.

pBufferContext is the context pointer originally provided by the pContext member of the XAUDIO2_BUFFER structure, which may be NULL.

OnBufferEnd is guaranteed to be called just after the last byte of the current buffer has been consumed and before the first byte of the next buffer is consumed. This callback can be used to overwrite or release the audio data referenced by the completed buffer, and to update other state associated with the voice as appropriate.

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

Requirements

Header: Declared in xaudio2.h.

Library: Use xaudio2.lib.

See also

IXAudio2VoiceCallback

IXAudio2VoiceCallback Members