IDirectMusicPerformance::GetParam

The IDirectMusicPerformance::GetParam method retrieves data from a track inside the control segment.

HRESULT GetParam(
  REFGUID rguidType, 
  DWORD dwGroupBits,
  DWORD dwIndex, 
  MUSIC_TIME mtTime,
  MUSIC_TIME* pmtNext,
  void* pParam
);
 

Parameters

rguidType
Address of (C) or reference to (C++) the identifier of the type of data to obtain. See Track Parameter Types.
dwGroupBits
Group the desired track is in (see Remarks). Set this value to 0xFFFFFFFF for all groups.
dwIndex
Index of the track in the group from which to obtain the data.
mtTime
The time from which to obtain the data, in performance time.
pmtNext
Address of a variable to receive the time (relative to mtTime) until which the data is valid. If this returns a value of 0, it means either that the data will always be valid, or that it is unknown when it will become invalid. If this information is not needed, pmtNext can be set to NULL. See Remarks.
pParam
Address of an allocated structure in which the data is to be returned. The structure must be of the appropriate kind and size for the data type identified by rguidType.

Return Values

If the method succeeds, the return value is S_OK.

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

DMUS_E_NO_MASTER_CLOCK
DMUS_E_GET_UNSUPPORTED
DMUS_E_TRACK_NOT_FOUND
E_POINTER

Remarks

Normally the primary segment is the control segment. However, a secondary segment can be designated as a control segment when it is played. For more information on control segments, see Segments and DMUS_SEGF_FLAGS.

The data returned in *pParam can become invalid before the time returned in *pmtNext if another control segment is cued.

Each track belongs to one or more groups, each group being represented by a bit in dwGroupBits. For more information, see IDirectMusicSegment::InsertTrack and Identifying the Track.

QuickInfo

  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.

See Also

IDirectMusicPerformance::SetParam, IDirectMusicSegment::GetParam, IDirectMusicTrack::GetParam, IDirectMusicPerformance::SetGlobalParam, IDirectMusicPerformance::GetTime, Music Parameters