AudioCategory.SetVolume Method
Sets the volume of all sounds associated with this category.
Syntax
'Declaration
Public Sub SetVolume ( _
volume As Single _
)
public void SetVolume (
float volume
)
public:
void SetVolume(
float volume
)
Parameters
volume
Type: SingleVolume amplitude multiplier. volume is normally between 0.0 (silence) and 1.0 (full volume), but can range from
0.0f
tofloat.MaxValue
.Volume levels map to decibels (dB) as shown in the following table.
Volume Description 0.0f -96 dB (silence) 1.0f +0 dB (full volume as authored) 2.0f +6 dB (6 dB greater than authored)
Requirements
Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
See Also
Reference
AudioCategory Structure
AudioCategory Members
Microsoft.Xna.Framework.Audio Namespace
Platforms
Windows Phone