DirectX SDK |
The IDirectMusicSegment::Clone method copies all or part of the segment and the tracks that it contains.
HRESULT Clone( MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment** ppSegment );
If the method succeeds, the return value is S_OK, or S_FALSE if some tracks failed to copy.
If it fails, the method can return one of the following error values:
E_OUTOFMEMORY |
E_POINTER |
If an IDirectMusicGraph interface exists in the segment, a copy of the pointer is included in the clone, and the reference count is incremented. The start point and loop points set by the IDirectMusicSegment::SetStartPoint and IDirectMusicSegment::SetLoopPoints methods are set to their default values (0, and 0 to the end of the segment, respectively) inside the clone. The number of repeats is also reset to 0. The resolution set by the IDirectMusicSegment::SetDefaultResolution method is copied into the clone.
For style-based segments, if mtStart is greater than 0, it should be on a measure boundary.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusici.h.