IVCmdAttributes::AutoGainEnableGet

HRESULT AutoGainEnableGet(DWORD *pdwAutoGain);

Retrieves the current automatic gain value for a voice-command site.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_UNEXPECTED
VCMDERR_INVALIDMODE
VCMDERR_NOTSUPPORTED
VCMDERR_OUTOFMEM

pdwAutoGain

[out] Address of a variable that receives the automatic gain.

A value of 0 indicates that automatic gain is disabled. A value of 100 indicates that the gain is set perfectly if the next utterance is spoken at the same level. A value between 0 and 100 moderates the automatic adjustments on a linear scale. For example, a pdwAudioGain value of 50 adjusts the gain to 50% of the level for the previous utterance.

When a voice-command object sends an IVCmdNotifySink::UtteranceEnd notification while automatic gain is enabled, it increases or decreases the gain on the audio device according to the engine's recommendation.

If the audio device does not support setting the gain on input, calling AutoGainEnableGet has no effect.

The automatic gain for a site is saved between uses of the site, even if the user shuts down the computer in the meantime.