Microsoft DirectX 8.1 (C++)

IDirectMusicSegment8::SetLength

The SetLength method sets the length, in music time, of the segment. This method is usually called by the loader, which retrieves the segment length from the file and passes it to the segment object.

Syntax

HRESULT SetLength(
  MUSIC_TIME mtLength
);

Parameters

mtLength

Desired length. Must be greater than 0.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return one of the error values shown in the following table.

Return code
E_INVALIDARG
DMUS_E_OUT_OF_RANGE

Remarks

Neglecting to set a primary segment length can cause problems when cueing other primary segments with the DMUS_SEGF_QUEUE flag.

Requirements

  Header: Declared in dmusici.h.

See Also