Microsoft DirectX 8.1 (C++) |
The DirectMusic loader can load compressed wave-form audio files in any format supported by the audio compression manager (ACM), as well as uncompressed wave files.
Segments based on wave files are played just like any other segment. They pass through the performance as DMUS_WAVE_PMSG messages and are always played on channel 0 of the audiopath. Although waves are not synthesized in the same sense as musical notes, they do pass through the synthesizer and can be manipulated by MIDI controllers.
Waves can also be embedded in DirectMusic Producer files, where they can behave somewhat like
Waves must be downloaded to the synthesizer before being played. In effect, a wave is a band instrument, and it is downloaded when the segment's bands are downloaded. For more information, see Downloading and Unloading Bands.
Waves can be either static or streaming. Static waves are loaded into synthesizer memory all at once. Streaming waves are loaded piece by piece as they play. Waves saved as DirectMusic Producer files are designated as static or streaming by the author, who also sets the readahead timethe maximum amount of data read into memory at one time. Standard .wav files are streaming if longer than 5,000 milliseconds, and the readahead is 500 milliseconds.