Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Struct · Ara

AudioSource

Declarative sound intent. Playback cursors and decoder state are presentation only.

public struct AudioSource : IComponent<AudioSource>

Properties

TypeIndex

public static uint TypeIndex { get; }

Stable engine component index.

Fields

Clip

public string Clip;

Cooked clip reference in @path#id form; absent means no clip.

Default: null.

Bus

public string Bus;

Mixer bus name resolved by the presentation bridge.

Default: "master".

Gain

public float Gain;

Linear source amplitude.

Range: [0, 16]. Default: 1.

Pitch

public float Pitch;

Playback pitch multiplier before Doppler.

Range: [0.125, 8]. Default: 1.

Looping

public bool Looping;

Whether the clip repeats.

Default: false.

Spatial

public bool Spatial;

Whether position affects the sound.

Default: true.

Priority

public byte Priority;

Voice budget priority; larger values are retained first.

Default: 128.

ReferenceDistance

public float ReferenceDistance;

Full-volume radius.

Unit: m. Range: [0.01, 100000]. Default: 1.

MaxDistance

public float MaxDistance;

Silent beyond this distance; must exceed referenceDistance.

Unit: m. Range: [0.02, 1000000]. Default: 100.

Attenuation

public Attenuation Attenuation;

Shape of the distance attenuation curve.

Default: "inverse".

Position

public Vector3 Position;

Source position, supplied from the ECS world transform by the bridge.

Unit: m. Default: [0,0,0].

Velocity

public Vector3 Velocity;

Source velocity in meters per second for Doppler.

Default: [0,0,0].

Forward

public Vector3 Forward;

Source forward axis; normalized during spatial evaluation.

Default: [0,0,-1].

ConeInner

public float ConeInner;

Full angle of the unattenuated source cone.

Unit: deg. Range: [0, 360]. Default: 360.

ConeOuter

public float ConeOuter;

Full angle at which the source reaches coneOuterGain.

Unit: deg. Range: [0, 360]. Default: 360.

ConeOuterGain

public float ConeOuterGain;

Linear amplitude outside the source cone.

Range: [0, 1]. Default: 1.

Methods

Access

public static ref AudioSource Access(Entity entity, bool write);

No description yet.

Insert

public static void Insert(in Commands commands, Entity entity, in AudioSource value);

No description yet.

Contains

public static bool Contains(Entity entity);

No description yet.