Microsoft DirectX 9.0

3D Audio Sample

The 3D Audio sample application shows how to create a 3-D audiopath in a DirectMusic performance, how to obtain an interface to a 3-D buffer and listener in that path, and how to modify the parameters of the buffer and listener.


Source: (SDK root)\Samples\C++\DirectMusic\3DAudio

Executable: (SDK root)\Samples\C++\DirectMusic\Bin

User's Guide

Click Open File and load a WAV, MIDI, or DirectMusic segment file. Play the segment. The position of the sound source is shown as a red dot on the graph, where the x-axis is from left to right and the z-axis is from bottom to top. Change the range of movement on the two axes by using the sliders.

The listener is located at the center of the graph, and has its default orientation, looking along the positive z-axis; that is, toward the top of the screen. The sound source moves to the listener's left and right and to the listener's front and rear, but does not move above and below the listener.

The sliders in the center of the window control the properties of the listener; that is, the global sound properties. If you click Defer Settings, changes are not applied until you click Apply Settings.

Programming Notes

The 3D Audio sample is very similar in form to the Play Audio Sample.

See Also