Vixen
02b45cc4
csharp
public record class AudioEventDescription

An event, with everything resolved: the clips are clips and the bus is an index.

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

Remarks

The runtime half of the parallel model MixerAsset established. AudioEventAsset is what a file holds — names and chunk ids — and this is what an engine can act on. Keeping them apart is what lets an event be built in code without inventing a chunk id for a clip that is already in hand, and what keeps the loading concerns out of the play path.

A record with defaults throughout, so new AudioEventDescription { Variants = [...] } is a complete, sensible event: shuffled, full volume, unlooped, on the master bus.

Fields and properties (16)

  • public string Name

    What it is called, for logs and for an editor's list.

  • public AudioEventVariant[] Variants

    The sounds it can play. One is normal; none plays nothing and is not an error.

  • public VariantSelection Selection

    How it chooses between them.

  • public uint Seed

    Where the random sequence starts.

  • public int Bus

    Which bus it routes into. Zero is the master.

  • public float GainDb

    Its level, before any variation.

  • public float GainVarianceDb

    How far either side of GainDb a play may land.

  • public float PitchVarianceSemitones

    How far either side of the written pitch a play may land, in semitones.

  • public bool Loop

    Whether a play wraps round instead of ending.

  • public int Priority

    How hard a play is to displace when the voice pool is full. Higher survives.

  • public int MaxInstances

    How many copies may sound at once. Zero is no limit.

  • public EventStealMode Steal

    What gives way when MaxInstances is reached.

  • public AudioParameterSheet? Parameters

    The named values its plays read, or null for a sound nothing drives.

  • public AudioEventLayer[] Layers

    Other events played alongside this one, each a moment later.

  • public bool IsSpatial

    Whether it is a thing in the world rather than a sound in the room.

  • public SpatialSettings Spatial

    How it attenuates, cones and dopplers. The position comes from the caller.

Used by (7)

  • AudioEventVixen.Audio
  • AudioEventBuilderVixen.Audio
  • AudioEventSystemTestsVixen.Audio.Tests
  • AudioEventTestsVixen.Audio.Tests
  • LayeredEventTestsVixen.Audio.Tests
  • ScattererTestsVixen.Audio.Tests
  • VoiceParameterTestsVixen.Audio.Tests