Microsoft DirectX 8.1 (Visual Basic) |
The SetLoopPoints method sets the start and end points inside the segment to repeat the number of times set by the DirectMusicSegment8.SetRepeats method.
object.SetLoopPoints(mtStart As Long, mtEnd As Long)
Parts
object
Resolves to a DirectMusicSegment8 object.
mtStart
Point at which to begin the loop, in music time.
mtEnd
Point at which to end the loop, in music time. A value of 0 loops the entire segment.
Error Codes
If the method fails, it raises an error, and Err.Number can be set to DMUS_E_OUT_OF_RANGE.
Remarks
When the segment is played, it plays from the segment start time until mtEnd, then loops to mtStart, plays the looped portion the number of times set by DirectMusicSegment8.SetRepeats, and then plays to the end.
The default values are set to loop the entire segment from beginning to end.
The method fails if mtStart is greater than or equal to the length of the segment, or if mtEnd is greater than the length of the segment. If mtEnd is 0, mtStart must be 0 as well.
This method does not affect any currently playing
A segment that is reused might be loaded from an internal cache, in which case it will have the same loop points it had the last time this value was set. It is a good idea to reset the loop points to 0 before releasing a segment that might be played again.
See Also