Mixer Master { get; set; }

robot_2Generated
code_blocksInput

Description

The Master property of the Sandbox.Audio.Mixer class provides access to the master audio mixer. This mixer is responsible for handling all audio that does not have a specific mixer assigned to it. It acts as the default mixer for the audio system, ensuring that all sounds are processed and outputted correctly.

Usage

Use the Master property to access the master audio mixer in your application. This is useful when you need to control or modify the global audio settings, such as volume or effects, that apply to all sounds in the game.

Example

// Access the master audio mixer
Sandbox.Audio.Mixer masterMixer = Sandbox.Audio.Mixer.Master;

// Set the volume of the master mixer
masterMixer.Volume = 0.8f;

// Mute the master mixer
masterMixer.Mute = true;

// Check if the master mixer is the default mixer
bool isMaster = masterMixer.IsMaster;