Table of Contents

Class AudioEmitterProcessor

Namespace
Stride.Audio
Assembly
Stride.Engine.dll

Processor in charge of updating the AudioEmitterComponents.

public class AudioEmitterProcessor : EntityProcessor<AudioEmitterComponent, AudioEmitterProcessor.AssociatedData>
Inheritance
AudioEmitterProcessor
Inherited Members

Remarks

More precisely it updates the AudioEmitters and then applies 3D localization to each couple AudioEmitterComponent-AudioListenerComponent. When a new emitter or a new listener is added to the system, its creates the required SoundInstances and associate them with the new emitter/listener tuples.

Constructors

AudioEmitterProcessor()

Create a new instance of the processor.

public AudioEmitterProcessor()

Methods

Draw(RenderContext)

Performs work related to this processor.

public override void Draw(RenderContext context)

Parameters

context RenderContext

GenerateComponentData(Entity, AudioEmitterComponent)

Generates associated data to the given entity.

protected override AudioEmitterProcessor.AssociatedData GenerateComponentData(Entity entity, AudioEmitterComponent component)

Parameters

entity Entity

The entity.

component AudioEmitterComponent

Returns

AudioEmitterProcessor.AssociatedData

The associated data.

IsAssociatedDataValid(Entity, AudioEmitterComponent, AssociatedData)

Checks if the current associated data is valid, or if readding the entity is required.

protected override bool IsAssociatedDataValid(Entity entity, AudioEmitterComponent component, AudioEmitterProcessor.AssociatedData associatedData)

Parameters

entity Entity

The entity.

component AudioEmitterComponent
associatedData AudioEmitterProcessor.AssociatedData

The associated data.

Returns

bool

True if the change in associated data requires the entity to be readded, false otherwise.

OnEntityComponentAdding(Entity, AudioEmitterComponent, AssociatedData)

Run when a matching entity is added to this entity processor.

protected override void OnEntityComponentAdding(Entity entity, AudioEmitterComponent component, AudioEmitterProcessor.AssociatedData data)

Parameters

entity Entity

The entity.

component AudioEmitterComponent
data AudioEmitterProcessor.AssociatedData

The associated data.

OnEntityComponentRemoved(Entity, AudioEmitterComponent, AssociatedData)

Run when a matching entity is removed from this entity processor.

protected override void OnEntityComponentRemoved(Entity entity, AudioEmitterComponent component, AudioEmitterProcessor.AssociatedData data)

Parameters

entity Entity

The entity.

component AudioEmitterComponent
data AudioEmitterProcessor.AssociatedData

The associated data.

OnSystemAdd()

Run when this EntityProcessor is added to an EntityManager.

protected override void OnSystemAdd()

OnSystemRemove()

Run when this EntityProcessor is removed from an EntityManager.

protected override void OnSystemRemove()