Class AudioVoice¶
Namespace: Apogee.Audio
Assembly: Apogee.Audio.dll
Something that is playing, or about to: a sound on a source (
public sealed class AudioVoice : EngineObject
Inheritance¶
object ← EngineObject ← AudioVoice
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()
Remarks¶
Letting go of the voice: a sound that does not loop plays on to its end; a looping sound is stopped when its voice is destroyed, which a script's voice is when the script drops it. Keep the voice of something that loops.
Properties¶
Class¶
What the registry knows about this object's class.
public override ClassInfo Class { get; }
Property Value¶
Entity¶
The entity the voice follows in 3D, or 0 for a voice that is not positional (or sits at the listener).
public Entity Entity { get; set; }
Property Value¶
IsPlaying¶
Whether it is still sounding (a paused sound is).
public bool IsPlaying { get; }
Property Value¶
MaxDistance¶
The distance in meters beyond which the voice gets no quieter.
public float MaxDistance { get; set; }
Property Value¶
MinDistance¶
The distance in meters up to which the voice is not made quieter.
public float MinDistance { get; set; }
Property Value¶
Muffling¶
How much the sound is muffled by what is between it and the listener, 0 (nothing) to 1.
public float Muffling { get; }
Property Value¶
Occlusion¶
Check the way from the listener with the physics world's rays and muffle the sound behind walls (smoothly): needs
public bool Occlusion { get; set; }
Property Value¶
Paused¶
public bool Paused { get; set; }
Property Value¶
Pitch¶
Playback speed and pitch together: 1 is as recorded, 2 an octave up.
public float Pitch { get; set; }
Property Value¶
Position¶
The playback position in seconds.
public float Position { get; }
Property Value¶
Volume¶
public float Volume { get; set; }
Property Value¶
Methods¶
OnDestroyed()¶
protected override void OnDestroyed()
Stop()¶
Stops it at once.
public void Stop()