Vixen
02b45cc4
csharp
public sealed class AudioParameterSheet

A set of parameters, and the automation that turns their values into four numbers.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Shared and immutable. One sheet describes every instance of a sound; the values are per voice and live in the engine. So ten players talking through one underwater description is one sheet and ten sets of floats, rather than ten copies of a curve.

Evaluated on the game thread, once a frame. AudioEngine.Update steps each voice's values towards their targets, calls Evaluate, and writes the four results onto the voice as plain floats — which the audio thread was already reading. No curve, no name lookup and no allocation goes anywhere near a device callback.

Fields and properties (4)

  • public const int MaxParameters

    The most parameters one sound may have.

  • public int Count

    How many parameters it has.

  • public AudioParameterDefinition this[int index]

    One of them.

  • public bool HasBuiltins

    Whether any of its parameters is one the engine fills in.

Methods (6)

  • public AudioParameterSheet(IReadOnlyList<AudioParameterDefinition> parameters)

    A sheet over some parameters.

  • public int IndexOf(string name)

    Finds a parameter by name.

  • public float Normalize(int index, float value)

    Where a value sits in a parameter's range, from 0 to 1.

  • public AudioParameterResult Evaluate(ReadOnlySpan<float> values)

    Runs every curve and combines what they asked for.

  • public void CopyDefaultsTo(Span<float> values)

    Fills a span with every parameter's default.

  • public void Seek(int index, ref float current, float target, float deltaSeconds)

    Moves a value towards a target at the rate its parameter asked for.

Used by (9)

  • AudioEngineVixen.Audio
  • AudioEventVixen.Audio
  • AudioEventBuilderVixen.Audio
  • AudioEventDescriptionVixen.Audio
  • AudioParameterSheetTestsVixen.Audio.Tests
  • BuiltinParameterTestsVixen.Audio.Tests
  • OcclusionTestsVixen.Audio.Tests
  • VoiceParameterTestsVixen.Audio.Tests
  • VoiceParametersVixen.Audio