DSPStream Sample

Description

The DSPStream sample is similar to DSStream, except that it streams wave data directly to the primary buffer.

Path

Source: (SDK root)\Samples\Multimedia\DSound\Src\DSPStrm

Executable: (SDK root)\Samples\Multimedia\DSound\Bin

User's Guide

Load a single wave file by selecting Open from the File menu. Play the sound once by choosing Play! from the main menu or by clicking the Play button. Halt the playback by choosing Stop! from the main menu or by clicking the Stop button.

To make the program play the sound continuously, select the checkbox labeled Looped.

The program displays controls for panning the sound and adjusting the volume. If DEBUG was defined during compilation, the scrolling display shows a record of the write position (wp), play position (pp), and next write (nw), along with the percentage of the wave file that has been played. The progress through the file is also shown by a slider.

You can make DSStream enumerate the sound drivers when it is next started. To do this, select Enumerate Drivers from the Options menu.

Programming Notes

The program demonstrates how to stream a wave file directly into the primary buffer. The buffer's format is changed to match that of the wave data.