Microsoft DirectX 8.1 (Visual Basic)

DirectMusicPerformance8.StopEx

The StopEx method stops playback of an object.

object.StopEx( _
  ObjectToStop As Unknown, _
  lStopTime As Long, _
  lFlags As Long)

Parts

object

Resolves to a DirectMusicPerformance8 object.

ObjectToStop

DirectMusicSegment8, DirectMusicSegmentState8, or DirectMusicAudioPath8 object to stop.

lStopTime

Time at which to stop. If the time is in the past or 0 is passed in this parameter, the object stops playing immediately.

lFlags

Flags that indicate when the stop should occur. Boundaries are in relation to the current primary segment. If this parameter is 0, the stop occurs immediately. Can contain one of the following constants from the CONST_DMUS_SEGF_FLAGS enumeration, or DMUS_SEGF_REFTIME combined with one other flag.

Value Description
DMUS_SEGF_BEAT Stop on the next beat boundary at or after lStopTime.
DMUS_SEGF_DEFAULT Stop on the default boundary.
DMUS_SEGF_GRID Stop on the next grid boundary at or after lStopTime.
DMUS_SEGF_MEASURE Stop on the next measure boundary at or after lStopTime.
DMUS_SEGF_REFTIME The value in i64StopTime is in reference time.
DMUS_SEGF_SEGMENTEND Stop at the end of the segment.
DMUS_SEGF_MARKER Stop at the next marker.

Error Codes

If the method fails, an error is raised.

Remarks

Stopping a segment stops all instances that are playing.

See Also