Microsoft DirectX 8.0 (C++) |
Begins playback of a segment. The method offers greater functionality than IDirectMusicPerformance8::PlaySegment.
HRESULT PlaySegmentEx( IUnknown* pSource, WCHAR *pwzSegmentName, IUnknown* pTransition, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState** ppSegmentState, IUnknown* pFrom, IUnknown* pAudioPath );
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_AUDIOPATH_INACTIVE |
DMUS_E_AUDIOPATH_NOPORT |
DMUS_E_NO_MASTER_CLOCK |
DMUS_E_SEGMENT_INIT_FAILED |
DMUS_E_TIME_PAST |
E_OUTOFMEMORY |
E_POINTER |
Segments should be greater than 250 milliseconds in length.
The boundary resolutions in dwFlags are relative to the primary segment.
If a primary segment is scheduled to play while another primary segment is playing, the first one stops unless you set the DMUS_SEGF_QUEUE flag for the second segment, in which case it plays as soon as the first one finishes.
For more information on the exact start time of segments, see Segment Timing. For information on how the start time of segments can be affected by tempo changes, see Clock Time vs. Music Time.
If DMUS_SEGF_AUTOTRANSITION is specified in dwFlags and a segment is already playing at i64StartTime and is being interrupted, the method composes a transition between the two segments and plays it before playing pSource. The transition is based a template provided at pTransition.
The method can be used to play on a performance that does not use audiopaths; that is, one initialized by using IDirectMusicPerformance8::Init. In this case the pAudioPath parameter must be NULL.
Header: Declared in dmusici.h.