Share via


Audiopath.SetVolume

Windows Media Encoder SDK banner art

The SetVolume method sets the volume for all segments and songs playing through this audiopath. The volume is an attenuation factor cumulative with volumes authored into the content as well as volumes applied by Performance.SetMasterVolume.

object.SetVolume iVolume, [iDuration] 

Parts

object

Required. Object expression that resolves to an Audiopath Object.

iVolume

Required. Integer that specifies the attenuation of the volume, in hundredths of a dB. This value must be in the range from -9600 to 0. A value of zero specifies the base volume. A negative value indicates the amount by which the base volume is attenuated. The volume cannot be increased over the base level.

iDuration

Optional. Integer that specifies the duration, in milliseconds, over which the volume change occurs.

Remarks

This method should not be called while a previous volume change with duration is still in process.

The actual precision of volume changes is about 0.75 dB.

See Also