Using Sounds in 3D

Many multimedia computer systems nowadays have high-end speaker systems attached to high-end audio cards. It isn't uncommon for a system to have the ability to use full surround sound, and it won't be long before 5.1 systems are the norm for computers, particularly for the gamers.

The DirectSound API already has the ability to play sounds in 3D space, and can use these features if the computer supports them today. The options are controlled with the Buffer3D object (for controlling the actual source of the sound) and the Listener3D object (for controlling the position and orientation of the listener). You'll notice that the constructors for these objects each take in a buffer that is used to create the 3D version of the audio. ...

Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.