Microsoft DirectX 8.0 (C++)

IDirectMusicPerformance8::StopEx

Stops playback of an object.

HRESULT StopEx(
  IUnknown *pObjectToStop,
  __int64 i64StopTime, 
  DWORD dwFlags
);

Parameters

pObjectToStop
Pointer to the IUnknown interface of the segment, segment state, or audiopath to stop.
i64StopTime
Time at which to stop. If the time is in the past or if 0 is passed in this parameter, the object stops playing immediately.
dwFlags
Flags that indicate when the stop should occur. Boundaries are in relation to the current primary segment. Can be one of the following values, or DMUS_SEGF_REFTIME combined with one other.
0
Stop immediately.
DMUS_SEGF_AUTOTRANSITION
Compose and play a transition to silence. Valid only when stopping a song. Not implemented in DirectX 8.0.
DMUS_SEGF_BEAT
Stop on the next beat boundary at or after i64StopTime.
DMUS_SEGF_DEFAULT
Stop on the default boundary, as set by the IDirectMusicSegment8::SetDefaultResolution method.
DMUS_SEGF_GRID
Stop on the next grid boundary at or after i64StopTime.
DMUS_SEGF_MEASURE
Stop on the next measure boundary at or after i64StopTime.
DMUS_SEGF_REFTIME
The value in i64StopTime is in reference time.
DMUS_SEGF_SEGMENTEND
Stop at the end of the primary segment.
DMUS_SEGF_MARKER
Stop at the next marker.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return E_POINTER.

Remarks

Stopping a segment stops all instances that are playing.

Requirements

  Header: Declared in dmusici.h.

See Also

IDirectMusicPerformance8::Stop, IDirectMusicPerformance8::PlaySegmentEx, DMUS_SEGF_FLAGS