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