AudioListenerComponent Class
Namespace: Stride.EngineAssembly: Stride.Engine.dll
Component representing an audio listener.
Derived from AudioListenerComponent:
[Display("Audio listener", null, Expand = ExpandRule.Once)]
[DataContract("AudioListenerComponent")]
[DefaultEntityComponentProcessor(typeof(AudioListenerProcessor), ExecutionMode = ExecutionMode.Runtime)]
[ComponentOrder(6000)]
[ComponentCategory("Audio")]
public sealed class AudioListenerComponent : ActivableEntityComponent, IIdentifiable
Remarks
Associate this component to an Entity to simulate a physical listener listening to the AudioEmitterComponents of the scene, placed at the entity's center and oriented along the entity's Oz (forward) and Oy (up) vectors.
Use the AudioSytem's Stride.Audio.AudioSystem.AddListener(Stride.Engine.AudioListenerComponent) and Stride.Audio.AudioSystem.RemoveListener(Stride.Engine.AudioListenerComponent) functions to activate/deactivate the listeners that are actually listening at a given time.
The entity needs to be added to the Entity System so that the associated AudioListenerComponent can be processed.