IDirectMusicSegment8::SetLength

DirectMusic

Microsoft DirectX 9.0 SDK Update (Summer 2004)

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

The length does not affect the time for which the segment plays, but it is used to determine when the segment ends for purposes of synchronization; for example, when another segment is cued with the DMUS_SEGF_QUEUE flag.

Requirements

  Header: Declared in dmusici.h.

See Also


© 2004 Microsoft Corporation. All rights reserved.