public sealed class MixControlEvery knob in the mix, reachable by name.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The runtime half of live update. What makes a designer able to move a fader in an editor while the game runs is not a socket — a socket is an afternoon — it is that every knob has a stable name, that the name can be read as well as written, and that the whole set can be enumerated so the other end knows what to draw. All three are here; what is not is the transport, which belongs with the editor in Phase 6 and can be written against this without touching the mixer again.
Paths and not indices. An index is a position in whatever order the mixer happened to be built in, and it moves the day somebody inserts a bus — which is the day a saved editor layout starts controlling the wrong thing. The one exception is an effect's position in its own chain, which is its identity: two reverbs on one bus differ only by where they sit.
Decibels at the boundary, linear underneath. A fader is drawn and thought about in decibels; the mixer multiplies by a linear gain. Converting here rather than at either end means an editor never has to know, and it means −∞ has an obvious spelling.
It only reads and writes what already exists. Nothing here creates a bus, adds an effect or changes a route: a live-update session adjusts a mix, and a mix whose shape can change underneath a running game is a different and much harder problem.
Fields and properties (1)
public const float SilenceDbThe level a fader shows when it is all the way down.
Methods (4)
public MixControl(AudioEngine engine)Every knob in the mix, reachable by name.
public bool TryGet(string path, out float value)Reads a knob.
public bool TrySet(string path, float value)Turns a knob.
public IReadOnlyList<MixControlInfo> Enumerate()Every knob there is, so the other end knows what to draw.
Used by (3)
- AudioEngineVixen.Audio
- MixControlServerVixen.Audio
- MixControlTestsVixen.Audio.Tests