Microsoft DirectX 9.0

IDirectMusicPort8::GetChannelPriority

The GetChannelPriority method retrieves the priority of a MIDI channel. For an overview, see Channels.

Syntax

HRESULT GetChannelPriority(
  DWORD dwChannelGroup, 
  DWORD dwChannel, 
  LPDWORD pdwPriority
);

Parameters

dwChannelGroup

Group that the channel is in.

dwChannel

Index of the channel on the group.

pdwPriority

Address of a variable that receives the priority ranking. See Remarks.

Return Values

The return value is S_OK.

Remarks

The following values, defined in Dmusicc.h, each represent a range of priorities. They are listed here in descending order of priority.

Value
DAUD_CRITICAL_VOICE_PRIORITY
DAUD_HIGH_VOICE_PRIORITY
DAUD_STANDARD_VOICE_PRIORITY
DAUD_LOW_VOICE_PRIORITY
DAUD_PERSIST_VOICE_PRIORITY

The following values express the default ranking of the channels within a range, according to the DLS standard. They are listed here in descending order. Channel 10, the percussion channel, has the highest priority.

Value
DAUD_CHAN10_VOICE_PRIORITY_OFFSET
DAUD_CHAN1_VOICE_PRIORITY_OFFSET
DAUD_CHAN2_VOICE_PRIORITY_OFFSET
DAUD_CHAN3_VOICE_PRIORITY_OFFSET
DAUD_CHAN4_VOICE_PRIORITY_OFFSET
DAUD_CHAN5_VOICE_PRIORITY_OFFSET
DAUD_CHAN6_VOICE_PRIORITY_OFFSET
DAUD_CHAN7_VOICE_PRIORITY_OFFSET
DAUD_CHAN8_VOICE_PRIORITY_OFFSET
DAUD_CHAN9_VOICE_PRIORITY_OFFSET
DAUD_CHAN11_VOICE_PRIORITY_OFFSET
DAUD_CHAN12_VOICE_PRIORITY_OFFSET
DAUD_CHAN13_VOICE_PRIORITY_OFFSET
DAUD_CHAN14_VOICE_PRIORITY_OFFSET
DAUD_CHAN15_VOICE_PRIORITY_OFFSET
DAUD_CHAN16_VOICE_PRIORITY_OFFSET

The priority of a channel is represented by a range plus an offset. For example, DAUD_HIGH_VOICE_PRIORITY combined with DAUD_CHAN10_VOICE_PRIORITY_OFFSET represents the highest priority within the high range. Combined range and offset values for the standard range are defined for convenience in Dmusicc.h as DAUD_CHAN1_DEF_VOICE_PRIORITY, .DAUD_CHAN2_DEF_VOICE_PRIORITY, and so on.

Channels that have the same priority value have equal priority, regardless of which channel group they belong to.

Requirements

  Header: Declared in dmusicc.h.

See Also