DirectX Audio

From DirectXWiki

Jump to: navigation, search

Audio in DirectX can be played with 3 different API's. These are DirectSound, XACT and DirectShow.

Here are some excerpts from the SDK, describing the features:

DirectSound enables the playing of sounds with very low latency and gives applications a high level of control over hardware resources. By using the DirectSound interfaces in your application, you can do the following: Play sounds from files or resources in WAV format. Play multiple sounds simultaneously. Assign high-priority sounds to hardware-controlled buffers. Locate sounds in a customizable 3D environment. Add effects such as echo and chorus, and change effect parameters dynamically. Capture WAV sounds from a microphone or other input. DirectSound works on Microsoft Windows 98, Microsoft Windows 2000, and later operating systems. Some functionality, chiefly capture effects, is available only on Microsoft Windows XP and later.

More on DirectSound(including tutorial code).


Microsoft Cross-Platform Audio Creation Tool (XACT) is a production-ready environment for integrating audio resources into game titles. It is expected that audio designers will use one of the many linear audio editing packages that are available commercially to develop the core audio elements (waves) for the game. The designer will then use XACT to package those audio resources to aid the programmer in making them an interactive part of gameplay. The XACT API functions allow the programmer to integrate the designer's work into the game title flexibly and efficiently. The XACT run-time libraries: Ease the integration of wave, sound and cue information from the audio designer. Support in-memory and streaming wave banks with minimal programmer intervention. Free the game title developer to focus on gameplay rather than feeding audio hardware. Allow audio resources to be invoked by cue name rather than by specific components. Provide notification of audio events to the game title. Provide a powerful feature called zero-latency streaming that solves the problem of fitting waves within allocated memory. This feature is discussed in more detail in XACT Streaming Wave Banks.

More on XACT(including tutorial code).


DirectShow can be used for audio and video. You can use it to play movies, dvds, or compressed audio, like wma or mp3 files. Here is what the SDK says to DirectShow: But DirectShow was removed from the DirectX SDK as of April 2005. You can obtain the headers, libraries, tools, and samples for DirectShow in the Windows® Software Development Kit (formerly known as the Platform SDK). DirectSetup in the DirectX SDK continues to support the redistribution of DirectShow's system components, and the latest components are already installed on the following operating systems: Microsoft Windows XP Service Pack 2, Windows XP Professional x64 Edition, Windows Server 2003 Service Pack 1, and Windows Vista. For Documentation please have a look at the MSDN DirectShow Website.

More on DirectShow(including tutorial code).

Personal tools