Microsoft DirectX 8.0 (C++) |
Sets the variations to be played by a part in the track.
HRESULT SetVariation( IDirectMusicSegmentState* pSegState, DWORD dwVariationFlags, DWORD dwPart );
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
DMUS_E_NOT_INIT |
E_POINTER |
Variations can be set for only one part at a time. Each time this method is called, it overrides previous calls.
The following example code plays variations 16 and 32 on performance channel 1.
// pPattern is an IDirectMusicPatternTrack8 pointer. // pSegmentState is an IDirectMusicSegmentState8 pointer. #define VARIATION(v) (1 << ((v) - 1)) HRESULT hr = pPattern->SetVariation( pSegmentState, VARIATION(32) | VARIATION(16), 1);
Header: Declared in dmusici.h.