IXAudio2 interface

IXAudio2 is the interface for the XAudio2 object that manages all audio engine states, the audio processing thread, the voice graph, and so forth.

This is the only XAudio2 interface that is derived from the COM IUnknown interface. It controls the lifetime of the XAudio2 object using two methods derived from IUnknown: IXAudio2::AddRef and IXAudio2::Release. No other XAudio2 objects are reference-counted; their lifetimes are explicitly controlled using create and destroy calls, and are bounded by the lifetime of the XAudio2 object that owns them.


The IXAudio2 interface has these methods.

Method Description
IXAudio2::AddRef Adds a reference to the XAudio2 object.
IXAudio2::CommitChanges Atomically applies a set of operations that are tagged with a given identifier.
IXAudio2::GetPerformanceData Returns current resource usage details, such as available memory or CPU usage.
IXAudio2::QueryInterface Queries for a given COM interface on the XAudio2 object.
IXAudio2::RegisterForCallbacks Adds an IXAudio2EngineCallback pointer to the XAudio2 engine callback list.
IXAudio2::Release Releases a reference to the XAudio2 object.
IXAudio2::StartEngine Starts the audio processing thread.
IXAudio2::StopEngine Stops the audio processing thread.
IXAudio2::UnregisterForCallbacks Removes an IXAudio2EngineCallback pointer from the XAudio2 engine callback list.
IXAudio2::CreateMasteringVoice Creates and configures a mastering voice.
IXAudio2::CreateSourceVoice Creates and configures a source voice.
IXAudio2::CreateSubmixVoice Creates and configures a submix voice.
IXAudio2::SetDebugConfiguration Changes global debug logging options for XAudio2.


The DirectX SDK versions of XAUDIO2 included three member functions that are not present in the Windows 8 version: GetDeviceCount, GetDeviceDetails, and Initialize. These enumeration methods are no longer provided and standard Windows Audio APIs should be used for device enumeration instead.

Platform Requirements

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


Target Platform Windows
Header xaudio2.h

See also

XAudio2 Interfaces