次の方法で共有


Setting and Retrieving Track Parameters

The following methods are used for setting and retrieving track parameters:

When calling one of these methods on the performance or segment, you can identify the track by setting the dwGroupBits and dwIndex parameters. Usually, however, you can let DirectMusic find the appropriate track for you. For more information, see Identifying the Track.

The track parameter that is being set or retrieved is identified by a GUID in the rguidType parameter of the method. Each parameter that requires data is associated with a particular data type, and pParam must point to a variable or structure of this type. In some cases, part of the data structure must be initialized even when retrieving the parameter. For some parameters, you must also specify the time within the track at which the change is to take effect or for which the parameter is to be retrieved.

For reference information on the data associated with the standard parameter types, see Standard Track Parameters.

Some parameter changes might not appear to take effect immediately. For example, changing the groove level does not make a difference until the current pattern is about to finish playing and the next pattern is chosen. If you want the change to take effect sooner, you can force the current pattern to be discarded by calling the IDirectMusicPerformance8::Invalidate method.

To determine whether a particular parameter is supported by a track, use the IDirectMusicTrack8::IsParamSupported method and check for an S_OK result.

© 2004 Microsoft Corporation. All rights reserved.