Called when a critical error occurs during voice processing.
public:
void OnVoiceError(
void *pBufferContext,
HRESULT Error
)
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.
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.
Header: Declared in xaudio2.h.
Library: Use xaudio2.lib.