DirectX SDK

DirectMusicPerformance.GetCommand

The DirectMusicPerformance.GetCommand method retrieves a command from the performance's control segment. The command indicates what type of pattern is being played at the specified time.

object.GetCommand(mtTime As Long, mtUntil As Long) As Byte

Parameters

object
Object expression that resolves to a DirectMusicPerformance object.
mtTime
Time for which the command is to be retrieved, in music time.
mtUntil
Variable to receive the music time (relative to mtTime) until which the command is valid. If this returns a value of 0, either the command is always valid, or it is unknown when it might become invalid. See Remarks.

Return Values

If the method succeeds, it returns a command type. See CONST_DMUS_COMMANDT_TYPES.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following error codes:

DMUS_E_NO_MASTER_CLOCK
DMUS_E_GET_UNSUPPORTED
DMUS_E_NOT_FOUND
DMUS_E_TRACK_NOT_FOUND

Remarks

Normally, the primary segment is the control segment. However, a secondary segment can be designated as a control segment when it is played. The object returned by the method can become invalid before the time returned in mtUntil if another control segment is cued.

See Also

CONST_DMUS_SEGF_FLAGS