Class AudioSound¶
Namespace: Apogee.Audio
Assembly: Apogee.Audio.dll
A sound file loaded by
public sealed class AudioSound : EngineObject
Inheritance¶
object ← EngineObject ← AudioSound
Inherited Members¶
EngineObject.IsAdopted, EngineObject.Handle, EngineObject.IsDestroyed, EngineObject.Class, EngineObject.Adopt(), EngineObject.TryGet(SlotHandle, out EngineObject), EngineObject.Destroy(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties¶
Class¶
What the registry knows about this object's class.
public override ClassInfo Class { get; }
Property Value¶
Is3D¶
public bool Is3D { get; }
Property Value¶
Length¶
The length in seconds (0 when the file does not say).
public float Length { get; }
Property Value¶
MaxDistance¶
The distance in meters beyond which the sound gets no quieter: 10000. Voices of this sound start with it.
public float MaxDistance { get; set; }
Property Value¶
MinDistance¶
The distance in meters up to which the sound is not made quieter (inverse-distance rolloff starts here): 1. Voices of this sound start with it.
public float MinDistance { get; set; }
Property Value¶
Path¶
public string Path { get; }
Property Value¶
Methods¶
OnDestroyed()¶
protected override void OnDestroyed()
Play(string, float, float, bool, Entity)¶
Plays it on bus (see loop),
following entity if given. Returns the voice.
public AudioVoice Play(string bus = "", float volume = 1, float pitch = 1, bool loop = false, Entity entity = default)
Parameters¶
bus string
volume float
pitch float
loop bool
entity Entity