Platform SDK: DirectX |
The IDirectMusicPerformance::PlaySegment method begins playback of a segment.
HRESULT PlaySegment( IDirectMusicSegment* pSegment, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState** ppSegmentState );
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
E_OUTOFMEMORY |
E_POINTER |
DMUS_E_NO_MASTER_CLOCK |
DMUS_E_SEGMENT_INIT_FAILED |
DMUS_E_TIME_PAST |
Segments should be greater than 250 milliseconds in length.
The boundary resolutions in dwFlags are relative to the currently playing 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.
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.