DirectX SDK |
Some methods of DirectMusicPerformance and DirectMusicSegment have the effect of setting or retrieving parameters on a particular track, usually in the control segment. However, applications using DirectX for Visual Basic do not need to be concerned about tracks as such, and these methods can be used without any knowledge of what is happening at a lower level.
Set and retrieve track parameters by using the SetParam and GetParam methods of either the performance, the segment, or the track. When calling one of these methods on the performance or segment, you can identify the track by setting the dwGroupBits and dwIndex parameters. However, in most cases, you can let DirectMusic find the appropriate track for you. For more information, see Identifying the Track.
In some cases, you must specify the time within the track at which the change is to take effect or for which the parameter is to be retrieved. To see whether this value is used for a particular track parameter, see Track Parameter Types.
For a few parameters, a call to SetParam turns a feature on or off, and no data is needed. When setting other parameters, however, you must also supply a structure or variable containing the data. Only parameters with associated data can be retrieved, so when using GetParam, you must always supply a pointer to an appropriate variable or structure to receive the data.
To determine whether a particular parameter is supported by a track, use the IDirectMusicTrack::IsParamSupported method, and check for an S_OK result.
More information is given in the following topics: