Platform SDK: DirectX

DMUS_PORTPARAMS

The DMUS_PORTPARAMS structure contains parameters for the opening of a DirectMusic port. These parameters are passed in when the IDirectMusic::CreatePort method is called.

typedef struct _DMUS_PORTPARAMS {
    DWORD dwSize;
    DWORD dwValidParams;
    DWORD dwVoices;
    DWORD dwChannelGroups;
    DWORD dwAudioChannels;
    DWORD dwSampleRate;
    DWORD dwEffectFlags;
    DWORD fShare;
} DMUS_PORTPARAMS, *LPDMUS_PORTPARAMS;

Members

dwSize
Size of the structure, in bytes. This member must be initialized to sizeof(DMUS_PORTPARAMS) before the structure is passed to a method.
dwValidParams
Specifies which port parameters in this structure have been filled in. Setting the flag for a particular parameter means that you want to have this parameter set on the method call or want to override the default value when the port is created. The following flags have been defined:

DMUS_PORTPARAMS_VOICES
DMUS_PORTPARAMS_CHANNELGROUPS
DMUS_PORTPARAMS_AUDIOCHANNELS
DMUS_PORTPARAMS_SAMPLERATE
DMUS_PORTPARAMS_EFFECTS
DMUS_PORTPARAMS_SHARE

dwVoices
Number of voices required on this port. This is not an absolute maximum; the port can create additional temporary voices to enable smooth transitions when lower-priority voices have to be dropped.
dwChannelGroups
Number of channel groups to be allocated on this port. Must be less than or equal to the number of channel groups specified in the DMUS_PORTCAPS structure returned by the IDirectMusic::EnumPort and IDirectMusicPort::GetCaps methods.
dwAudioChannels
Desired number of output channels.
dwSampleRate
Desired sample rate, in hertz.
dwEffectFlags
Flags indicating which special effects are desired. The following flags are defined:

DMUS_EFFECT_NONE
DMUS_EFFECT_REVERB
DMUS_EFFECT_CHORUS

fShare
If TRUE, all ports use the channel groups assigned to this port. If FALSE, the port is opened in exclusive mode, and the use of the same channel groups by other ports is forbidden.

Requirements

  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.

See Also

DMUS_PORTCAPS