DMUS_PORTCAPS
The DMUS_PORTCAPS structure receives information about a port enumerated by a call to the IDirectMusic::EnumPort method. The structure is also used to return information through the IDirectMusicPort::GetCaps method.
typedef struct _DMUS_PORTCAPS {
DWORD dwSize;
DWORD dwFlags;
GUID guidPort;
DWORD dwClass;
DWORD dwType;
DWORD dwMemorySize;
DWORD dwMaxChannelGroups;
DWORD dwMaxVoices;
DWORD dwMaxAudioChannels;
DWORD dwEffectFlags;
WCHAR wszDescription[DMUS_MAX_DESCRIPTION];
} DMUS_PORTCAPS, *LPDMUS_PORTCAPS;
Members
- dwSize
- Size of the structure, in bytes. This member must be initialized to sizeof(DMUS_PORTCAPS) before the structure is passed to any method.
- dwFlags
- Flags describing various capabilities of the port. This field can contain one or more of the following values:
- DMUS_PC_DIRECTSOUND
- The port supports streaming wave data to DirectSound.
- DMUS_PC_DLS
- The port supports Level 1 sample collections.
- DMUS_PC_DLS2
- The port supports DLS Level 2 sample collections.
- DMUS_PC_EXTERNAL
- The port connects to devices outside the host—for example, devices connected over an external MIDI port such as the MPU-401.
- DMUS_PC_GMINHARDWARE
- The synthesizer has its own GM instrument set, so GM instruments do not need to be downloaded.
- DMUS_PC_GSINHARDWARE
- This port contains the Roland GS sound set in hardware.
- DMUS_PC_MEMORYSIZEFIXED
- Memory available for instruments cannot be adjusted.
- DMUS_PC_SHAREABLE
- More than one port can be created that uses the same range of channel groups on the device. Unless this bit is set, the port can be opened only in exclusive mode. In exclusive mode, an attempt to create a port fails unless free channel groups are available to assign to the create request.
- DMUS_PC_SOFTWARESYNTH
- The port is a software synthesizer.
- DMUS_PC_XGINHARDWARE
- The port contains the Yamaha XG extensions in hardware.
- guidPort
- Identifier of the port. This value can be passed to the IDirectMusic::CreatePort method to get an IDirectMusicPort interface for the port.
- dwClass
- Class of this port. The following classes are defined:
- DMUS_PC_INPUTCLASS
- Input port.
- DMUS_PC_OUTPUTCLASS
- Output port.
- dwType
- Type of this port. The following types are defined:
- DMUS_PORT_WINMM_DRIVER
- Windows multimedia driver.
- DMUS_PORT_USER_MODE_SYNTH
- User-mode synthesizer.
- DMUS_PORT_KERNEL_MODE
- WDM driver.
- dwMemorySize
- Amount of memory available to store instruments. If the port is using system memory and the amount is therefore limited only by the available system memory, this field contains DMUS_PC_SYSTEMMEMORY.
- dwMaxChannelGroups
- Maximum number of channel groups supported by this port. A channel group is a set of 16 MIDI channels.
- dwMaxVoices
- Maximum number of voices that can be allocated when this port is opened. The value can be –1 if the driver does not support returning this parameter.
- dwMaxAudioChannels
- Maximum number of audio channels that can be rendered by the port. The value can be –1 if the driver does not support returning this parameter.
- dwEffectFlags
- Flags indicating what audio effects are available on the port.
The following flags are defined:
- DMUS_EFFECT_NONE
- No effects are supported.
- DMUS_EFFECT_REVERB
- The port supports reverb.
- DMUS_EFFECT_CHORUS
- The port supports chorus.
- wszDescription
- Description of the port. This can be a system-generated name, such as L"MPU-401 Output Port [330]", or a user-specified friendly name, such as L"Port w/ External SC-55".
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.