ITTSAttributes::VolumeSet

HRESULT VolumeSet(DWORD dwVolume);

Sets the baseline speaking volume for a text-to-speech mode.

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

<E_INVALIDARG>
<E_OUTOFMEMORY>
<TTSERR_NOTSUPPORTED>
<TTSERR_VALUEOUTOFRANGE>

dwVolume

[in] New baseline speaking volume. The low-order word specifies the volume for the left channel, and the high-order word specifies the volume for the right channel. An application can specify TTSATTR_MINVOLUME or TTSATTR_MAXVOLUME for minimum or maximum allowable values. If the values are out of range for the engine, the function returns an error and the speaking volume is not changed.

The text-to-speech engine or the audio object may not support independent control of the left and right channels. In this case, the engine typically uses the left channel value for the baseline volume.