Microsoft DirectX 9.0


The put_Volume method sets the volume (amplitude) of the audio signal.


HRESULT put_Volume(
  long lVolume



[in] Specifies the volume, as a number from –10,000 to 0, inclusive.  Full volume is 0, and –10,000 is silence. Multiply the desired decibel level by 100. For example, –10,000 = –100 dB.

Return Values

Returns an HRESULT value. Possible values include the following.

Value Description
E_FAIL The underlying audio device returned an error.
E_INVALIDARG The value of lVolume is invalid.
E_NOTIMPL The filter graph does not contain an audio renderer filter. (Possibly the source does not contain an audio stream.)
S_OK Success.

See Also