Microsoft DirectX 8.1 (Visual Basic) |
The PlayAudio sample plays a sound on an audiopath and enables the user to set the tempo and master volume.
Source: (SDK root)\Samples\Multimedia\VBSamples\DirectMusic\PlayAudio
Executable: (SDK root)\Samples\Multimedia\VBSamples\DirectMusic\Bin
Load a segment, MIDI file, or wave by clicking Audio File. Select playback options. The Tempo slider is not enabled for wave files.
The application sets up a notification of type DMUS_NOTIFY_ON_SEGMENT, which triggers the DirectXEvent8_DXCallback procedure on various segment-related events. In the callback procedure, the subtype of the notification message is checked to see if the segment has stopped playing. If it has, the user interface is updated to enable play options.