Vixen
02b45cc4

AudioListenerComponent

scene component Core/Vixen.Audio/Ecs/AudioComponents.cs:270
csharp
public struct AudioListenerComponent

Marks the entity whose transform the mixer listens from.

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

Remarks

Named with the suffix because AudioListener is already the value the mixer holds, and a subsystem with two things of the same name is a bug waiting to be written. This is the component; that is the state it produces.

The first one found wins. A world with two is a mistake — there is one set of speakers — and the system says so rather than averaging them into a listener that is nowhere.

Fields and properties (7)

  • public float Gain

    A gain over every positioned voice.

  • public float Weight

    How much of the mix these ears get, against the other listeners'.

  • public bool AutoVelocity

    Whether the system works velocity out from how far the entity moved.

  • public Vector3 Velocity

    How fast it is moving, in units a second.

  • public Vector3 PreviousPosition

    Where it was last frame. Owned by the system.

  • public bool HasPreviousPosition

    Whether PreviousPosition means anything yet.

  • public static AudioListenerComponent Default

    Full gain, velocity worked out from movement.

Used by (10)

  • AudioEventSystemTestsVixen.Audio.Tests
  • AudioSystemVixen.Audio
  • AudioSystemTestsVixen.Audio.Tests
  • ComponentRegistrationVixen.Audio
  • MultipleListenerTestsVixen.Audio.Tests
  • ReverbZoneSystemTestsVixen.Audio.Tests
  • TypeRegistrationVixen.Audio
  • Vixen_Audio_Ecs_AudioListenerComponentSerializerVixen.Audio
  • ComponentTestsVixen.Editor.App.Tests
  • MaterialIconsVixen.Editor.App