Class Audio.Mixer

implements Audio.Source Audio.Sink

An audio mixer. The mixer can contain any number of inputs and outputs. Independent gain values can be set for each input/output pair and these gains can be controlled via scheduled events as well as any MIDI source.

Constructors

Mixer(integer inputs, integer outputs, array gains) create a new audio mixer.

Properties

output Audio.Connection outputs as an array
input Audio.Connector inputs as an array

Methods

connect(Audio.Source source, float gain)
connect(Audio.Source source, array gains)
connect(Audio.Connection connection, float gain)
gain(integer input, integer output, float amount) immediately change the gain between an input and output
play(Audio.Buffer buffer) immediately play an audio buffer.
play(Audio.Clip clip) immediately play an audio clip.
schedule(Audio.Clip clip, float measure, Time.Clock clock) schedule an audio clip to play.
schedule(Audio.MixerGain gain, float measure, Time.Clock clock) schedule a gain change between a given input and output
schedule(Audio.Buffer buffer, float measure, Time.Clock clock) schedule an audio buffer to play.

Constructor Documentation


Mixer(integer inputs, integer outputs, array gains)

Create a new audio mixer.

Parameters

Property Documentation


array output

Audio.Connection outputs as an array. Adding or removing elements to this array has no effect on the underlying audio component.


array input

Audio.Connector inputs as an array. Adding or removing elements to this array has no effect on the underlying audio component.

Method Documentation


void connect(Audio.Source source, float gain)

Parameters


void connect(Audio.Source source, array gains)

Parameters


void connect(Audio.Connection connection, float gain)

Parameters


void gain(integer input, integer output, float amount)

Immediately change the gain between an input and output

Parameters


void play(Audio.Buffer buffer)

Immediately play an audio buffer.

Parameters


void play(Audio.Clip clip)

Immediately play an audio clip.

Parameters


void schedule(Audio.Clip clip, float measure, Time.Clock clock)

Schedule an audio clip to play.

Parameters


void schedule(Audio.MixerGain gain, float measure, Time.Clock clock)

Schedule a gain change between a given input and output. Unity gain is 1.0

Parameters


void schedule(Audio.Buffer buffer, float measure, Time.Clock clock)

Schedule an audio buffer to play.

Parameters



Creative Commons Logo This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.