Roblox UtilitiesDevlHub Roblox Documentation

Class

AudioChannelMixer

Inherits
Instance › Object
Memory category
Internal

Combines multiple audio streams into a single, multichannel audio stream.

AudioChannelMixer mixes multiple audio streams into a single, multichannel stream. It provides one combined Input pin, one Output pin, as well as the following secondary input pins, all of which can be connected to/from by Wires: Left, Right, Center, SurroundLeft, SurroundRight, Sub, BackLeft, BackRight, TopLeft, TopRight, TopBackLeft, and TopBackRight.

Diagram showing position of all potential channels.

Properties 1#

LayoutAudioChannelLayoutControls the output channel layout to be mixed to.ReadSafe

Layout: AudioChannelLayout#

ReadSafe

Controls the output channel layout to be mixed to. The Input pin of AudioChannelMixer is always forwarded "as-is" to Output, but depending on the value of Layout:

  • For Mono, the Center pin consumes audio streams.
  • For Stereo, the Left and Right pins consume audio streams.
  • For Quad, the Left, Right, BackLeft, and BackRight pins consume audio streams.
  • Surround_5 is the same as Quad, plus Center consumes an audio stream.
  • Surround_5_1 is the same as Surround_5, plus Sub consumes an audio stream.
  • Surround_7_1 is the same as Surround_5_1, plus SurroundLeft and SurroundRight consume audio streams.
  • For Surround_7_1_4, all secondary input pins consume audio streams.

Methods 3#

GetConnectedWiresReturns an array of Wires that are connected to the specified pin.
GetInputPinsGets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property.
GetOutputPinsGets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property.

GetConnectedWires(pin: string): List<Wire>#

Returns an array of Wires that are connected to the specified pin. For AudioChannelMixer, this can be one "Output" pin or a number of input pins - see AudioChannelMixer.GetInputPins for a full list.

NameTypeDefaultDescription
pinstringAn input or output pin on this instance
Returns
  • List<Wire> — An array of Wires

GetInputPins(): Array#

Gets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property.

For AudioChannelMixer, these are:

  • "Input"
  • "Left"
  • "Right"
  • "Center"
  • "SurroundLeft"
  • "SurroundRight"
  • "BackLeft"
  • "BackRight"
  • "Sub"
  • "TopLeft"
  • "TopRight"
  • "TopBackLeft"
  • "TopBackRight"
Returns
  • Array — An array of strings representing valid pin names.

GetOutputPins(): Array#

Gets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property.

For AudioChannelMixer, this is Output only.

Returns
  • Array — An array of strings representing valid pin names.

Events 1#

WiringChangedFires when another instance is connected to or disconnected from the AudioChannelMixer via a Wire.

WiringChanged(connected: boolean, pin: string, wire: Wire, instance: Instance)#

Event that fires after a Wire becomes connected or disconnected, and that Wire is now or was previously connected to a pin on the AudioChannelMixer and to some other wirable instance.

NameTypeDefaultDescription
connectedbooleanWhether the instance got connected or disconnected.
pinstringThe pin on the AudioChannelMixer that the Wire targets.
wireWireThe Wire between the AudioChannelMixer and the other instance.
instanceInstanceThe other instance that is or was connected through the Wire.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed