AudioCategory.SetVolume Method

Sets the volume of all sounds associated with this category.

Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public void SetVolume (
         float volume
)

Parameters

volume

Volume amplitude multiplier. volume is normally between 0.0 (silence) and 1.0 (full volume), but can range from 0.0f to float.MaxValue.

Volume levels map to decibels (dB) as shown in the following table.

VolumeDescription
0.0f-96 dB (silence)
1.0f +0 dB (full volume as authored)
2.0f +6 dB (6 dB greater than authored)

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show: