IDirectMusicPatternTrack8::SetPatternByName
The SetPatternByName method sets the pattern to be played by the track. The pattern comes from a style.
Syntax
HRESULT SetPatternByName(
IDirectMusicSegmentState* pSegState,
WCHAR* wszName,
IDirectMusicStyle* pStyle,
DWORD dwPatternType,
DWORD* pdwLength
);
Parameters
pSegState
Address of the IDirectMusicSegmentState8 interface representing the playing instance of the segment that contains the track.
wszName
Name of the pattern to set. The name can be obtained by using IDirectMusicStyle8::EnumPattern.
pStyle
Address of the IDirectMusicStyle or IDirectMusicStyle8 interface of the style containing the pattern.
dwPatternType
One of the DMUS_STYLET_TYPES enumerations that specifies the type of pattern.
pdwLength
Address of a variable that receives the length of the pattern, in music time ticks.
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 |
DMUS_E_NOT_FOUND |
DMUS_E_NOT_INIT |
E_OUTOFMEMORY |
E_POINTER |
Requirements
** Header:** Dmusici.h
See Also