Struct SoundHandle ​
Namespace: ValveResourceFormat.Renderer.Audio
Assembly: Renderer.dll
A reference to one play of a sound event. SoundEvent instances are pooled across plays, so the handle checks SoundEvent.PlaybackId and goes inert once the instance is reused.
public readonly struct SoundHandleProperties ​
IsValid ​
Gets whether this handle refers to a play that actually started; it may have finished since.
public bool IsValid { get; }Property Value ​
bool
Playing ​
Gets whether the play is currently producing audible samples.
public bool Playing { get; }Property Value ​
bool
Position ​
Gets or sets the world position of the sound; null plays it unspatialized.
public Vector3? Position { get; set; }Property Value ​
Started ​
Gets whether the play is active in the mixer.
public bool Started { get; }Property Value ​
bool
Volume ​
Gets or sets a live 0..1 gain on top of the volume the play started with.
public float Volume { get; set; }Property Value ​
float
Methods ​
FadeIn(float) ​
Fades the play in from silence over the given seconds.
public void FadeIn(float seconds)Parameters ​
seconds float
FadeOutAndStop(float) ​
Fades the play out and stops it.
public void FadeOutAndStop(float fallbackSeconds = 1)Parameters ​
fallbackSeconds float
Stop() ​
Stops the play, if it is still this handle's own.
public void Stop()
