Microsoft DirectX 9.0

Segment States

When you play a segment, parameters for that instance of the playing segment (such as the audiopath, start point, and number of repetitions) are stored in an object called a segment state, represented by an IDirectMusicSegmentState8 interface.

When different instances of a segment are being played on different audiopaths, you can use the segment state to retrieve a 3-D sound buffer or an effect, and make changes that apply only to that instance. For example, you might use the same engine sound for different cars in a race game, playing the sound for each car on its own audiopath. You can use either IDirectMusicAudioPath8::GetObjectInPath or IDirectMusicSegmentState8::GetObjectInPath to retrieve an IDirectSound3DBuffer8 interface from each audiopath, allowing you to set the 3-D parameters for each car individually.

See Also