AudioAPI reference
Struct VoiceHandle
Namespace: MicroEngine.Audio
Assembly: MicroEngine.Audio.dll
Guide: Audio
A sound playing in an AudioEngine: a voice slot and the generation of the sound that took it. Once the
sound ends, is stopped or is stolen by the voice limit, the handle is stale and calls with it do nothing.
default is None, which Play also
returns for a sound the voice policy refused.
public readonly struct VoiceHandle : IEquatable<VoiceHandle>Implements
Constructors
VoiceHandle(int, uint)
A sound playing in an AudioEngine: a voice slot and the generation of the sound that took it. Once the
sound ends, is stopped or is stolen by the voice limit, the handle is stale and calls with it do nothing.
default is None, which Play also
returns for a sound the voice policy refused.
public VoiceHandle(int Index, uint Generation)Parameters
Index int
The voice slot.
Generation uint
The generation of the sound in the slot; 0 only for None.
Properties
Generation
The generation of the sound in the slot; 0 only for None.
public uint Generation { get; init; }Property Value
Index
The voice slot.
public int Index { get; init; }Property Value
IsNone
Whether this is None.
public bool IsNone { get; }Property Value
None
No sound.
public static VoiceHandle None { get; }Property Value
Methods
Deconstruct(out int, out uint)
public void Deconstruct(out int Index, out uint Generation)Parameters
Index int
Generation uint
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(VoiceHandle)
public bool Equals(VoiceHandle other)Parameters
other VoiceHandle
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(VoiceHandle, VoiceHandle)
public static bool operator ==(VoiceHandle left, VoiceHandle right)Parameters
left VoiceHandle
right VoiceHandle
Returns
operator !=(VoiceHandle, VoiceHandle)
public static bool operator !=(VoiceHandle left, VoiceHandle right)Parameters
left VoiceHandle
right VoiceHandle