Microsoft DirectX 8.1 (C++)

IDirectMusicSegment8::SetStartPoint

The SetStartPoint method sets the point within the segment at which it will start playing.

Syntax

HRESULT SetStartPoint(
  MUSIC_TIME mtStart
);

Parameters

mtStart

Point within the segment at which it is to start playing. Must be greater than or equal to zero and less than the length of the segment.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return DMUS_E_OUT_OF_RANGE.

Remarks

The start point is the first point in the segment that can possibly be heard. However, the actual first point heard may be later, if the start point of the segment is aligned to a past time. For more information, see Segment Timing.

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

If the segment does not already have a length, IDirectMusicSegment8::SetLength must be called before this method.

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

The start point of a cached segment persists even if the segment is released, and then reloaded. To ensure that a segment is not subsequently reloaded from the cache, call IDirectMusicLoader8::ReleaseObject on it before releasing it.

Requirements

  Header: Declared in dmusici.h.

See Also