DMUS_NOTIFICATION_PMSG

This structure is a DMUS_PMSG that represents a notification.

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. For more information, see DMUS_PMSG.

  • guidNotificationType
    Identifier of the notification type. The following table shows the possible types.

    Type 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_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 values shown in the following table.

    Value Description
    DMUS_NOTIFICATION_SEGABORT The segment was stopped by IDirectMusicPerformance::Stop.
    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 values shown in the following table.

    Value Description
    DMUS_NOTIFICATION_GROOVE Groove 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 values shown in the following table.

    Value Description
    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.

  • 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 IDirectMusicSegmentState interface, call IDirectMusicSegmentState::GetSegment to get the IDirectMusicSegment pointer, and then call the IDirectMusicSegment::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 IDirectMusicTrack::AddNotificationType.

Requirements

OS Versions: Windows CE .NET 4.0 and Windows CE .NET 4.1.
Header: Dmusici.h.

See Also

Notification and Event Handling | IDirectMusicSegment | IDirectMusicSegmentState | IDirectMusicPerformance::SendPMsg | IDirectMusicPerformance::Stop | IDirectMusicSegment::GetParam | IDirectMusicSegmentState::GetSegment | IDirectMusicTrack::AddNotificationType | DMUS_PMSG

 Last updated on Monday, April 12, 2004

© 1992-2002 Microsoft Corporation. All rights reserved.