Platform SDK: DirectX

Using Wave Files

[Visual Basic]

Information on using waves with DirectSound is contained in the following topics:

[C++]

The IDirectSound and IDirectSoundCapture interfaces do not include methods for handling wave files. However, the source code for several of the sample applications includes functions for opening and creating a wave file, reading and writing the file headers, and streaming data to or from the file. These functions are found in Wavread.cpp and Wavwrite.cpp.

Wave files are in the Resource Interchange File Format (RIFF), which consists of a variable number of "chunks" containing either header information (for example, the wave format of sound samples) or data (the samples themselves). The Win32 API supplies functions for opening and closing RIFF files, seeking chunks, and so on. These functions, whose names all start with "mmio," are used by the wrapper functions in the sample code.

More information about using the wrapper functions is given in the following two topics: