DMUS_NOTIFICATION_PMSG

DirectMusic

Microsoft DirectX 9.0 SDK Update (Summer 2004)

DMUS_NOTIFICATION_PMSG

The DMUS_NOTIFICATION_PMSG structure contains message data for a notification.

Syntax

typedef struct DMUS_NOTIFICATION_PMSG {
  DMUS_PMSG_PART
  GUID guidNotificationType;
  DWORD  dwNotificationOption;
  DWORD  dwField1;
  DWORD  dwField2;
} DMUS_NOTIFICATION_PMSG;

Members

DMUS_PMSG_PART

Macro for common message members. See DMUS_PMSG.

guidNotificationType

Identifier of the notification type. The following types are defined.

Value Description
GUID_NOTIFICATION_CHORD Chord change.
GUID_NOTIFICATION_COMMAND Command event.
GUID_NOTIFICATION_MEASUREANDBEAT Measure and beat event.
GUID_NOTIFICATION_PERFORMANCE Performance event, further defined in dwNotificationOption.
GUID_NOTIFICATION_RECOMPOSE A track has been recomposed.
GUID_NOTIFICATION_SEGMENT Segment event, further defined in dwNotificationOption.

dwNotificationOption

Identifier of the notification subtype. If the notification type is GUID_NOTIFICATION_SEGMENT, this member can contain one of the following values.

Value Description
DMUS_NOTIFICATION_SEGABORT The segment was stopped prematurely, or was removed from the primary segment queue.
DMUS_NOTIFICATION_SEGALMOSTEND The segment has reached the end minus the Prepare Time.
DMUS_NOTIFICATION_SEGEND The segment has ended.
DMUS_NOTIFICATION_SEGLOOP The segment has looped.
DMUS_NOTIFICATION_SEGSTART The segment has started.

If the notification type is GUID_NOTIFICATION_COMMAND, this member can contain one of the following values.

Value Description
DMUS_NOTIFICATION_GROOVE Groove level change.
DMUS_NOTIFICATION_EMBELLISHMENT Embellishment command (intro, fill, break, or end).

If the notification type is GUID_NOTIFICATION_PERFORMANCE, this member can contain one of the following values.

Value Description
DMUS_NOTIFICATION_MUSICALMOSTEND The currently playing primary segment has reached the end minus the prepare time, and no more primary segments are cued to play.
DMUS_NOTIFICATION_MUSICSTARTED Playback has started.
DMUS_NOTIFICATION_MUSICSTOPPED Playback has stopped.

If the notification type is GUID_NOTIFICATION_MEASUREANDBEAT, this member contains DMUS_NOTIFICATION_MEASUREBEAT. No other subtypes are defined.

If the notification type is GUID_NOTIFICATION_CHORD, this member contains DMUS_NOTIFICATION_CHORD. No other subtypes are defined.

If the notification type is GUID_NOTIFICATION_RECOMPOSE, this member contains DMUS_NOTIFICATION_RECOMPOSE. No other subtypes are defined.

dwField1

Extra data specific to the type of notification. For GUID_NOTIFICATION_MEASUREANDBEAT notifications, this member returns the beat number within the measure.

dwField2

Extra data specific to the type of notification. Reserved for future or application-defined use.

Remarks

For most notifications, the punkUser member (see DMUS_PMSG) contains the IUnknown pointer of the segment state. This is especially useful in the cases of chords and commands, in which you can query for the IDirectMusicSegmentState8 interface, call IDirectMusicSegmentState8::GetSegment to get the IDirectMusicSegment8 pointer, and then call the IDirectMusicSegment8::GetParam method to get the chord or command at the time given in the notification message's mtTime member.

For notifications of type GUID_NOTIFICATION_PERFORMANCE, the punkUser member is always NULL.

Applications can define their own notification message types and subtypes and use dwField1 and dwField2 for extra data. Such custom notification messages can be allocated and sent like any other message. Application-defined tracks can send messages of a particular type after the GUID (guidNotificationType) has been handed to IDirectMusicTrack8::AddNotificationType.

Requirements

  Header: Declared in dmusici.h.

See Also


© 2004 Microsoft Corporation. All rights reserved.