Platform SDK: DirectX

DirectMusicSegment.SetStartPoint

The DirectMusicSegment.SetStartPoint method sets the point at which the segment starts playing in response to a call to the DirectMusicPerformance.PlaySegment method.

object.SetStartPoint(mtStart As Long)

Parameters

object
Object expression that resolves to a DirectMusicSegment object.
mtStart
Point within the segment at which it is to start playing, in music time. If this value is less than 0 or greater than the length of the segment, the start point is set to 0.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to DMUS_E_OUT_OF_RANGE.

Remarks

By default, the start point is 0, meaning that the segment starts from the beginning.

The call fails if mtStart is greater than or equal to the length of the segment.

The method does not affect any currently playing segment states created from this segment.

A segment that is reused might be loaded from an internal cache, in which case it has the same start point that it had the last time that this value was set. It is a good idea to set the start point to 0 before the object is released or reset.

See Also

DirectMusicSegment.GetStartPoint, DirectMusicSegmentState.GetStartPoint, DirectMusicSegment.SetLoopPoints