Microsoft DirectX 9.0 SDK Update (Summer 2003)

DVCLIENTCONFIG Structure


Controls the run-time parameters for the client.

Syntax

typedef struct {
    DWORD dwSize;
    DWORD dwFlags;
    LONG lRecordVolume;
    LONG lPlaybackVolume;
    DWORD dwThreshold;
    DWORD dwBufferQuality;
    DWORD dwBufferAggressiveness;
    DWORD dwNotifyPeriod;
} DVCLIENTCONFIG, *LPDVCLIENTCONFIG, *PDVCLIENTCONFIG;

Members

dwSize

Must be set to the size of this structure, in bytes, before using this structure.

dwFlags
Combination of the following flags. Possible values include the following:
DVCLIENTCONFIG_AUTORECORDVOLUME

Activates automatic gain control. With automatic gain control, Microsoft® DirectPlay® Voice adjusts the hardware input volume on your sound card automatically to get the best input level possible. You can determine the current input volume by looking at the lRecordVolume member of this structure after calling IDirectPlayVoiceClient::GetClientConfig, or by looking at the lRecordVolume member of the structure that accompanies a DVMSGID_INPUTLEVEL message.

DVCLIENTCONFIG_ECHOSUPPRESSION

Activates the echo suppression mode. This mode reduces echo introduced by configurations with external speakers and extremely sensitive microphones. While remote players' voices are being played back on the local speaker, the microphone is automatically muted. If the local player is transmitting, the playback of remote player voices is buffered until local input stops. After local input stops, playback resumes.

DVCLIENTCONFIG_MUTEGLOBAL

Mutes playback of the main sound buffer. Only sound buffers created through calls to IDirectPlayVoiceClient::Create3DSoundBuffer will be heard.

DVCLIENTCONFIG_PLAYBACKMUTE

Mutes playback of all DirectPlay Voice output and stops playback. This also stops decompression of incoming packets so CPU usage is reduced. Packets are effectively discarded while this flag is specified.

DVCLIENTCONFIG_RECORDMUTE

Mutes input from the microphone and stops recording. This also stops compression so CPU usage is reduced.

In addition to the preceding flags, the method of transmission is controlled by setting only one of the following flags or by not specifying either flag. Possible values include the following:
DVCLIENTCONFIG_AUTOVOICEACTIVATED

Places the transmission control system into automatic voice activation mode. In this mode, the sensitivity of voice activation is determined automatically by the system. The input level is adaptive, adjusting itself automatically to the input signal. For most applications this should be the setting used. This flag is mutually exclusive with the DVCLIENTCONFIG_MANUALVOICEACTIVATED flag.

DVCLIENTCONFIG_MANUALVOICEACTIVATED

Places the transmission control system into manual voice activation mode. In this mode, transmission of voice begins when the input level passes the level specified by the dwThreshold member. When input levels drop below the specified level, transmission stops. This flag is mutually exclusive with the DVCLIENTCONFIG_AUTOVOICEACTIVATED flag.

If you do not specify either DVCLIENTCONFIG_MANUALVOICEACTIVATED or DVCLIENTCONFIG_AUTOVOICEACTIVATED, the system will operate in push-to-talk mode. In push-to-talk mode, as long as there is a valid target specified the input from the microphone will be transmitted. Voice transmission stops when a NULL target is set or the current target leaves the session or is destroyed.

lRecordVolume

LONG value that specifies to what level the volume of the recording should be set. See the IDirectSoundBuffer8::SetVolume method for valid values.

If automatic gain control is enabled, this value can be set to DVRECORDVOLUME_LAST, which tells the system to use the current volume as determined by the automatic gain control algorithm. If a value other than DVRECORDVOLUME_LAST is specified in combination with automatic gain control, this value will be used to restart the algorithm at the specified value.

On return from a call to IDirectPlayVoiceClient::GetClientConfig, this value will contain the current recording volume. When adjusting the recording volume, DirectPlay Voice will adjust the volume for the microphone (if a microphone volume is present for the card) and the master recording volume (if one is present on the card). If neither a microphone volume nor a master record volume is present, DirectPlay Voice will be unable to adjust the recording volume.

lPlaybackVolume

Value indicating to what level the playback volume should be set. Adjusting this volume adjusts both the main buffer and all 3-D sound buffers. See the IDirectSoundBuffer8::SetVolume method for valid values. You can specify DVPLAYBACKVOLUME_DEFAULT to use a default value that is appropriate for most situations (full volume).

dwThreshold

Input level used to trigger voice transmission if the DVCLIENTCONFIG_MANUALVOICEACTIVATED flag is specified in the dwFlags member. When the flag is specified, this can be set to any value within the range of DVTHRESHOLD_MIN to DVTHRESHOLD_MAX. Additionally, DVTHRESHOLD_DEFAULT can be set to use a default value. If DVCLIENTCONFIG_MANUALVOICEACTIVATED or DVCLIENTCONFIG_AUTOVOICEACTIVATED is not specified in the dwFlags member. When the flag is specified, this can be set to any value within the range member of this structure (indicating push-to-talk mode) this value must be set to DVTHRESHOLD_UNUSED.

dwBufferQuality

Not implemented.

dwBufferAggressiveness

Not implemented.

dwNotifyPeriod

Value indicating how often you want to receive DVMSGID_OUTPUTLEVEL and DVMSGID_INPUTLEVEL (if session is full duplex) messages. If this value is set to 0, these messages are disabled. The value specifies the number of milliseconds between these messages. DVNOTIFYPERIOD_MINPERIOD specifies the minimum allowable period between messages.

Remarks

This structure is first used in the call to IDirectPlayVoiceClient::Connect, where it sets the initial state of these parameters. The structure can be retrieved after a connection has been made by calling IDirectPlayVoiceClient::GetClientConfig, and set using IDirectPlayVoiceClient::SetClientConfig.

Structure Information

Headerdvoice8.h
Minimum operating systems Windows 98


© 2003 Microsoft Corporation. All rights reserved.