DMUS_PMSG
The DMUS_PMSG structure contains information common to all DirectMusic messages. Because C does not support inheritance, the members of this structure are included in all message types (including DMUS_PMSG itself) by the inclusion of the DMUS_PMSG_PART macro, which expands to the syntax shown here.
typedef struct DMUS_PMSG {
DWORD dwSize;
REFERENCE_TIME rtTime;
MUSIC_TIME mtTime;
DWORD dwFlags;
DWORD dwPChannel;
DWORD dwVirtualTrackID;
IDirectMusicTool* pTool;
IDirectMusicGraph* pGraph;
DWORD dwType;
DWORD dwVoiceID;
DWORD dwGroupID;
IUnknown* punkUser;
} DMUS_PMSG;
Members
- dwSize
- Size of the structure, in bytes.
- rtTime
- Real time (in 100 nanosecond increments) at which the message is to be played, modified by dwFlags.
- mtTime
- Music time at which the message is to be played, modified by dwFlags.
- dwFlags
- Various bits (see DMUS_PMSGF_FLAGS and DMUS_TIME_RESOLVE_FLAGS).
- dwPChannel
- Performance channel (PChannel). The port, channel group, and MIDI channel can be derived from this value by using the IDirectMusicPerformance::PChannelInfo method.
- dwVirtualTrackID
- Identifier of the track.
- pTool
- Tool interface pointer.
- pGraph
- Tool graph interface pointer.
- dwType
- Message type (see DMUS_PMSGT_TYPES).
- dwVoiceID
- Reserved for future use. This value is always 0.
- dwGroupID
- Identifier of the track group or groups the message belongs to. (Tracks are assigned to groups in the IDirectMusicSegment::InsertTrack method.)
- punkUser
- User COM pointer. This pointer is always released when the message is freed. If the application wishes to retain the object, it should call AddRef before the message is freed.
Remarks
The DMUS_PMSG structure is used by itself for messages containing the following values in the dwType member:
- DMUS_PMSGT_STOP
- Sending a message of this type stops the performance at the indicated time.
- DMUS_PMSGT_DIRTY
- When a control segment starts or ends, all tools in the segment and performance graphs receive a message of this type, indicating that if they cache data from GetParam calls, they must call GetParam again to refresh their data. Tools that want to receive this message type must indicate their desire through a call to IDirectMusicTool::GetMediaTypes. Also, note that tools in the performance graph will receive one copy of the message for each segment in the performance. Such tools can safely ignore the extra messages with the same time stamp.
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::SendPMsg