IXAudio2VoiceCallback::OnVoiceError Method

Called when a critical error occurs during voice processing.

Syntax

public:
void OnVoiceError(
         void *pBufferContext,
         HRESULT Error
)  

Parameters

pBufferContext
Type: void *

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

Error
Type: HRESULT 

The HRESULT code of the error encountered.

Return value

None.

Remarks

OnVoiceError is called in the event of an error during voice processing, such as a hardware XMA decoder error on the Xbox 360. The arguments report which buffer was being processed at the time of the error, and its HRESULT code. If the error is not recoverable by destroying and re-creating the voice, the OnCriticalError engine callback will be called as well.

Requirements

Header: Declared in xaudio2.h.

Library: Use xaudio2.lib.

See also

IXAudio2VoiceCallback

IXAudio2VoiceCallback Members