Microsoft DirectX 8.1 (Visual Basic)

DirectMusicAudioPath8.SetVolume

The SetVolume method sets the audio volume on the path.

object.SetVolume(lVolume As Long, lDuration As Long)

Parts

object

Resolves to a DirectMusicAudioPath8 object.

lVolume

Value that specifies the attenuation, in hundredths of a decibel.

lDuration

Value that specifies the time, in milliseconds, over which the volume change takes place. A value of 0 ensures maximum efficiency.

Error Codes

If the method fails, an error is raised.

Remarks

This method works by sending a volume curve message. Any volume events occurring later, such as a band change, override the volume set by this method. DirectMusicAudioPath8.SetVolume is useful mainly for adjusting currently playing sounds; for example, to fade out before stopping a segment. If you want to make a global change that affects all playback, use one of the following techniques: