SoundEffect.MasterVolume Property (Microsoft.Xna.Framework.Audio)

Gets or sets the master volume scale applied to all SoundEffectInstances.

Namespace: Microsoft.Xna.Framework.Audio
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public static float MasterVolume { get; set; }

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Property Value

Type: System.Single
Each SoundEffectInstance has its own Volume property that is independent to SoundEffect.MasterVolume. During playback SoundEffectInstance.Volume is multiplied by SoundEffect.MasterVolume.This property is used to adjust the volume on all current and newly created SoundEffectInstances. The volume of an individual SoundEffectInstance can be adjusted on its own.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web