Microsoft DirectX 8.1 (Visual Basic)

AudioPath

Description

The AudioPath sample shows how files can be played on separate audiopaths, each of which can be manipulated separately.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\DirectMusic\AudioPath

Executable: (SDK root)\Samples\Multimedia\VBSamples\DirectMusic\Bin

User's Guide

Load one file on Audiopath 1 and one or more files on Audiopaths 2 and Audiopath 3. Click Play for any audiopath to play all files listed for that path. You can play more than one audiopath at the same time. Use the sliders to change the volume and 3-D spatialization on each audiopath.

Programming Notes

In the InitAudio procedure, the performance is initialized without a default audiopath, and three standard audiopaths are created. Each segment is played on a particular audiopath by passing that audiopath to DirectMusicPerformance8.PlaySegmentEx.

It is possible to play multiple instances of a segment on a single audiopath by loading the file more than once as a secondary segment. Because the instances play simultaneously in the sample, you only hear one instance. However, the sample does illustrate how each instance is represented by a DirectMusicSegmentState8 object, which is passed to DirectMusicPerformance8.IsPlaying to ascertain whether the instance is playing.