次の方法で共有


DMUS_PORTPARAMS8

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

The define DMUS_PORTPARAMS resolves to DMUS_PORTPARAMS8. This structure supersedes the earlier version of DMUS_PORTPARAMS, which is now declared as DMUS_PORTPARAMS7.

Syntax

  typedef struct _DMUS_PORTPARAMS8 {
  DWORD dwSize;
  DWORD dwValidParams;
  DWORD dwVoices;
  DWORD dwChannelGroups;
  DWORD dwAudioChannels;
  DWORD dwSampleRate;
  DWORD dwEffectFlags;
  DWORD fShare;
  DWORD dwFeatures;
} DMUS_PORTPARAMS8;
 
typedef DMUS_PORTPARAMS8 DMUS_PORTPARAMS;
typedef DMUS_PORTPARAMS *LPDMUS_PORTPARAMS;

Members

dwSize

Size of the structure, in bytes. This member must be initialized to sizeof(DMUS_PORTPARAMS8) before the structure is passed to a method.

dwValidParams

Specifies which members in this structure are valid. Setting the flag for a particular port 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
DMUS_PORTPARAMS_FEATURES

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 IDirectMusic8::EnumPort and IDirectMusicPort8::GetCaps methods.

dwAudioChannels

Desired number of output channels.

dwSampleRate

Desired sample rate, in hertz.

dwEffectFlags

Flags indicating which special effects are wanted. The following values are defined:

Flag Description
DMUS_EFFECT_NONE No effects are wanted.
DMUS_EFFECT_REVERB Reverb is wanted.
DMUS_EFFECT_CHORUS Chorus is wanted.
DMUS_EFFECT_DELAY Delay is wanted.

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.

dwFeatures

Miscellaneous capabilities of the port. The following values are defined.

Flag Description
DMUS_PORT_FEATURE_AUDIOPATH Supports an audiopath connection to DirectSound buffers.
DMUS_PORT_FEATURE_STREAMING Supports streaming waveforms through the synthesizer.

Requirements

**  Minimum Supported Client:** Windows 2000.
**  Minimum Supported Server:** Windows 2000 Server.

**  Header:** Dmusicc.h

See Also

© 2004 Microsoft Corporation. All rights reserved.