Microsoft DirectX 8.0 (C++) |
Creates an original segment from a style, a chordmap, and a template.
HRESULT ComposeSegmentFromTemplate( IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment );
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
E_INVALIDARG |
E_POINTER |
If pStyle is non-NULL, it is used in composing the segment; if it is NULL, a style is retrieved from the template specified in pTempSeg. Similarly, if pChordMap is non-NULL, it is used in composing the segment; if it is NULL, a chordmap is retrieved from the template.
If pStyle is NULL and there is no style track in the template, or pChordMap is NULL and there is no chordmap track, the method returns E_INVALIDARG.
The length of the segment is equal to the length of the template passed in.
The default start point and loop points of the created segment are 0, regardless of the values in the template segment.
Header: Declared in dmusici.h.
IDirectMusicComposer8::ComposeSegmentFromShape, IDirectMusicComposer8::ComposeTemplateFromShape, Using Templates