s&box docs
API ReferenceSandbox.Audio

public class Sandbox.Audio.Mixer

Takes a bunch of sound, changes its volumes, mixes it together, outputs it

Broader workflow and conceptual references connected to this API.

Methods

Showing 16 methods

public Sandbox.Audio.Mixer AddChild()

public void AddProcessor(Sandbox.Audio.AudioProcessor ap)

Add a processor to the list

public void ClearProcessors()

Add a processor to the list

public void Deserialize(System.Text.Json.Nodes.JsonObject js, Sandbox.Internal.TypeLibrary typeLibrary)

public void Destroy()

public static Sandbox.Audio.Mixer FindMixerByGuid(System.Guid guid)

public static Sandbox.Audio.Mixer FindMixerByName(string name)

public Sandbox.Audio.Mixer[] GetChildren()

public System.Collections.Generic.IReadOnlySet`1<uint> GetOcclusionTags()

Get an array of occlusion tags our sounds want to hit. May return null if there are none defined!

public T GetProcessor()

Get the first processor of a specific type, or null if not found

public Sandbox.Audio.AudioProcessor[] GetProcessors()

Get the current processor list

public void RemoveProcessor(Sandbox.Audio.AudioProcessor ap)

Add a processor to the list

public static void ResetToDefault()

public System.Text.Json.Nodes.JsonObject Serialize()

protected void SetMasterOcclusionDefaults()

public void StopAll(float fade)

Stop all sound handles using this mixer

Properties

Showing 18 properties

public float Sandbox.Audio.Mixer.AirAbsorption { get; set; }

How much the air absorbs energy from the sound

public int Sandbox.Audio.Mixer.ChildCount { get; set; }

public static Sandbox.Audio.Mixer Sandbox.Audio.Mixer.Default { get; set; }

public float Sandbox.Audio.Mixer.DistanceAttenuation { get; set; }

Sounds get quieter as they go further away

public System.Guid Sandbox.Audio.Mixer.Id { get; set; }

Unique identifier for this object, for lookup, deserialization etc

public bool Sandbox.Audio.Mixer.IsMaster { get; set; }

The default mixer gets all sounds that don't have a mixer specifically assigned

public static Sandbox.Audio.Mixer Sandbox.Audio.Mixer.Master { get; set; }

public int Sandbox.Audio.Mixer.MaxVoices { get; set; }

The maximum amount of voices to play at one time on this mixer

public Sandbox.Audio.AudioMeter Sandbox.Audio.Mixer.Meter { get; set; }

Allows monitoring of the output of the mixer

public bool Sandbox.Audio.Mixer.Mute { get; set; }

Is this mixer muted?

public string Sandbox.Audio.Mixer.Name { get; set; }

The display name for this mixer

public float Sandbox.Audio.Mixer.Occlusion { get; set; }

How much these sounds can get occluded

public Sandbox.TagSet Sandbox.Audio.Mixer.OcclusionTags { get; set; }

The tags which occlude our physics

public bool Sandbox.Audio.Mixer.OverrideOcclusion { get; set; }

If true then this mixer will use custom occlusion tags. If false we'll use what our parent uses.

public int Sandbox.Audio.Mixer.ProcessorCount { get; set; }

The amount of processors

public bool Sandbox.Audio.Mixer.Solo { get; set; }

Should this be the only mixer that is heard?

public float Sandbox.Audio.Mixer.Spacializing { get; set; }

When 0 the sound will come out of all speakers, when 1 it will be fully spacialized

public float Sandbox.Audio.Mixer.Volume { get; set; }

Scale the volume of our output by this amount

Metadata

FieldValue
NamespaceSandbox.Audio
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Audio.Mixer

On this page

Methodspublic Sandbox.Audio.Mixer AddChild()public System.Void AddProcessor(Sandbox.Audio.AudioProcessor ap)public System.Void ClearProcessors()public System.Void Deserialize(System.Text.Json.Nodes.JsonObject js, Sandbox.Internal.TypeLibrary typeLibrary)public System.Void Destroy()public static Sandbox.Audio.Mixer FindMixerByGuid(System.Guid guid)public static Sandbox.Audio.Mixer FindMixerByName(System.String name)public Sandbox.Audio.Mixer[] GetChildren()public System.Collections.Generic.IReadOnlySet`1<System.UInt32> GetOcclusionTags()public T GetProcessor()public Sandbox.Audio.AudioProcessor[] GetProcessors()public System.Void RemoveProcessor(Sandbox.Audio.AudioProcessor ap)public static System.Void ResetToDefault()public System.Text.Json.Nodes.JsonObject Serialize()protected System.Void SetMasterOcclusionDefaults()public System.Void StopAll(System.Single fade)Propertiespublic System.Single Sandbox.Audio.Mixer.AirAbsorption { get; set; }public System.Int32 Sandbox.Audio.Mixer.ChildCount { get; set; }public static Sandbox.Audio.Mixer Sandbox.Audio.Mixer.Default { get; set; }public System.Single Sandbox.Audio.Mixer.DistanceAttenuation { get; set; }public System.Guid Sandbox.Audio.Mixer.Id { get; set; }public System.Boolean Sandbox.Audio.Mixer.IsMaster { get; set; }public static Sandbox.Audio.Mixer Sandbox.Audio.Mixer.Master { get; set; }public System.Int32 Sandbox.Audio.Mixer.MaxVoices { get; set; }public Sandbox.Audio.AudioMeter Sandbox.Audio.Mixer.Meter { get; set; }public System.Boolean Sandbox.Audio.Mixer.Mute { get; set; }public System.String Sandbox.Audio.Mixer.Name { get; set; }public System.Single Sandbox.Audio.Mixer.Occlusion { get; set; }public Sandbox.TagSet Sandbox.Audio.Mixer.OcclusionTags { get; set; }public System.Boolean Sandbox.Audio.Mixer.OverrideOcclusion { get; set; }public System.Int32 Sandbox.Audio.Mixer.ProcessorCount { get; set; }public System.Boolean Sandbox.Audio.Mixer.Solo { get; set; }public System.Single Sandbox.Audio.Mixer.Spacializing { get; set; }public System.Single Sandbox.Audio.Mixer.Volume { get; set; }Metadata