Platform SDK: DirectX

IDirectMusicSegment::InitPlay

The IDirectMusicSegment::InitPlay method is called by the performance when the segment is about to be played.

HRESULT InitPlay(
  IDirectMusicSegmentState** ppSegState, 
  IDirectMusicPerformance* pPerformance,
  DWORD dwFlags
);

Parameters

ppSegState
Address of a variable to receive a pointer to the IDirectMusicSegmentState interface, which is created in response to this method call and is used to hold state data. It is returned with a reference count of 1, so a call to its Release method fully releases it.
pPerformance
Address of the IDirectMusicPerformance interface. This is needed by the segment and segment state to call methods on the performance object.
dwFlags
DMUS_SEGF_FLAGS that modify the track's behavior. See Remarks.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return one of the following error values:

E_POINTER
E_OUTOFMEMORY

Remarks

This method is for internal use by DirectMusic and should not be called by applications. It will not be supported in future versions.

The InitPlay method is called by the performance engine when the segment is about to be played. The segment, in turn, collects state objects for each of the tracks by calling their IDirectMusicTrack::InitPlay methods and stores the result in a segment state object, accessed by using the IDirectMusicSegmentState interface.

Requirements

  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.