The IDirectMusicPort::GetChannelPriority method is used to retrieve the priority of a MIDI channel. For an overview, see Channels.
HRESULT GetChannelPriority(
DWORD dwChannelGroup,
DWORD dwChannel,
LPDWORD pdwPriority
);
If the method succeeds, the return value is S_OK.
The following values, defined in Dmusicc.h, each represent a range of priorities. They are listed here in descending order of priority.
DAUD_CRITICAL_VOICE_PRIORITY |
DAUD_HIGH_VOICE_PRIORITY |
DAUD_STANDARD_VOICE_PRIORITY |
DAUD_LOW_VOICE_PRIORITY |
The following values express the default ranking of the channels within a range, according to the DLS Level 1 standard. They are listed here in descending order. Note that channel 10, the percussion channel, has the highest priority.
DAUD_CHAN10_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN1_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN2_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN3_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN4_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN5_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN6_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN7_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN8_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN9_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN11_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN12_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN13_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN14_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN15_DEF_VOICE_PRIORITY_OFFSET |
DAUD_CHAN16_DEF_VOICE_PRIORITY_OFFSET |
The priority of a channel is represented by a range plus an offset. For example, DAUD_STANDARD_VOICE_PRIORITY + DAUD_CHAN10_DEF_VOICE_PRIORITY represents the highest priority within the standard range.
Channels that have the same priority value have equal priority regardless of which channel group they belong to.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusicc.h.