Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Audio
Overviews
XAudio2
 XAudio2 Overview
XAudio2 Overview

XAudio2 Overview

XAudio2 is a low-level, cross-platform audio API for Microsoft Windows and Xbox 360. It provides a signal processing and mixing foundation for games that is similar to its predecessors, DirectSound and XAudio. For Windows game developers, XAudio2 is the long-awaited replacement for DirectSound. For Xbox 360 developers, it is an enhanced version of the previous XAudio API, addressing several outstanding issues and feature requests.

Because XAudio2 is cross-platform, it provides Windows and Xbox 360 developers with a "write once, compile twice" solution that significantly reduces the amount of work required to port across platforms.

The following is a list of XAudio2 features and new functionality that enable developers to improve performance in their games.

  • DSP Effects and Per Voice Filtering

    Digital Signal Processing (DSP) effects are the pixel shaders of audio. They handle everything from transforming a sound—turning a pig squeal into a low, scary monster sound—to placing sounds in the game environment using reverb and occlusion or obstruction filtering. XAudio2 provides a flexible and powerful DSP framework that is common to the Windows and Xbox 360 platforms. It also provides a built-in filter on every voice, for efficient low/high/band-pass filtering effects.

    See XAudio2 Audio Effects and IXAudio2Voice::SetFilterParameters for additional information about DSP effects and per voice filtering.

  • Submixing

    Submixing combines several sounds into a single audio stream—for example, an engine sound made up of composite parts, all of which are playing simultaneously. You also can use submixing to process and combine similar parts of a game. For example, all game sound effects could be combined to allow a user volume setting to be applied while a separate setting controls music volume. Combined with DSP, submixing provides the type of data routing and processing necessary for today's games. XAudio2 allows for arbitrary levels of submixing, enabling the creation of complex sounds and game mixes.

    See XAudio2 Audio Graph and XAudio2 Voices for additional information about submixing.

  • Compressed Audio Support

    One of the major feature requests for DirectSound has been for compressed audio support. XAudio2 supports compressed formats—ADPCM (Windows only), XMA (Xbox 360 only), and WMA—natively with run-time decompression.

  • Enhanced Multichannel and Surround Sound Support

    Multichannel, 3D, and surround sound support is expanded for both Windows and Xbox 360. On the Windows side, 3D and surround sound are much more flexible and transparent. On the Xbox 360 side, some of the limitations inherent in the XAudio architecture have been removed. XAudio2 removes the 6-channel limit on multichannel sounds and supports multichannel audio on any multichannel-capable audio card; the card does not need to be hardware-accelerated.

  • Multirate Processing

    To help minimize CPU usage, XAudio2 provides the technology to create multiple, low-rate audio processing graphs. This can reduce significantly CPU usage by allowing a game to process audio at the rate of the source material if the rate is less than 48 kHz.

  • Nonblocking API Model

    With few exceptions, an XAudio2 method call will not block the audio processing engine. This means that a client can safely make a set of method calls at any time without delays from blocking on long-running calls. The exceptions are the IXAudio2Voice::DestroyVoice method (which may block the engine until the voice being destroyed is finished processing) and the methods that terminate the audio thread: IXAudio2::StopEngine and IXAudio2::Release.

Related Topics

XAudio2 Getting Started
Provides an overview of key topics for using XAudio2.
XAudio2 Reference
Provides links to topics in the XAudio2 Reference section.
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker