|Microsoft DirectX 9.0|
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.
HRESULT SetLength( MUSIC_TIME mtLength );
Desired length. Must be greater than 0.
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.
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.
Header: Declared in dmusici.h.