Microsoft DirectX 9.0 SDK Update (Summer 2004) |
IDirectMusicAudioPath8::SetVolume
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
- Obtain the buffer object from the audiopath and use IDirectSoundBuffer8::SetVolume.
- Obtain the port object from the audiopath and use IKsControl::KsProperty to change the GUID_DMUS_PROP_Volume property set.
- Set the master volume for the performance. See Setting and Retrieving Global Parameters.
Requirements
Header: Declared in dmusici.h.
See Also
© 2004 Microsoft Corporation. All rights reserved.