Microsoft DirectX 9.0 SDK Update (October 2004) |
The SetVolume method sets the audio volume on the audiopath. The volume can be faded in or out.
Syntax
HRESULT SetVolume(
long lVolume,
DWORD dwDuration
);
Parameters
lVolume
Value that specifies the attenuation, in hundredths of a decibel. This value must be in the range from -9600 to 0. Zero is full volume.
dwDuration
Value that specifies the time, in milliseconds, over which the volume change takes place. A value of 0 ensures maximum efficiency.
Return Values
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the error values shown in the following table.
Return code |
DMUS_E_NOT_INIT |
E_INVALIDARG |
Remarks
This method works by sending a volume
Requirements
Header: Dmusici.h
Library: Dmime.dll, Dmimed.dll
See Also