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.

IXAudio2EngineCallback::OnCriticalError method

Called if a critical system error occurs that requires XAudio2 to be closed down and restarted.

Note  A critical error can happen when the underlying WASAPI rendering object is no longer available, such as when a headset or speaker are unplugged, a USB audio device is removed, and so on. The entire audio graph must be destroyed, audio device re-enumerated, and a new audio graph created since the various channel counts and formats could have changed.

Syntax


virtual void OnCriticalError(
  HRESULT Error
) = 0;

Parameters

Error

Error code returned by XAudio2.

Return value

This method does not return a value.

Remarks

Once a critical error has occurred, audio processing stops and all further calls to XAudio2 fail. The only way to recover in this situation is to release the XAudio2 instance and create a new one.

For information about the IXAudio2EngineCallback interface methods, see the XAudio2 Callbacks section.

Platform Requirements

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

Requirements

Header

Xaudio2.h

See also

IXAudio2EngineCallback
XAudio2 Callbacks

 

 

Community Additions

Show:
© 2014 Microsoft. All rights reserved.