AudioContextLatencyHint Struct
The (AudioContextLatencyCategory or double) union of the latency hint of an AudioContext (https://webaudio.github.io/web-audio-api/#dom-audiocontextoptions-latencyhint): a category, or a latency in seconds.
public readonly struct AudioContextLatencyHint : IEquatable<AudioContextLatencyHint>- Implements
Properties
| Name | Description |
|---|---|
| Category | Gets the category when the value is a category, otherwise null. |
| Seconds | Gets the latency in seconds when the value is a number, otherwise null. |
| Value | Gets the value: an AudioContextLatencyCategory or a Double. |
Category
AudioContextUnions.csGets the category when the value is a category, otherwise null.
public AudioContextLatencyCategory? Category { get; }Property value
Seconds
AudioContextUnions.csGets the value: an AudioContextLatencyCategory or a Double.
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(AudioContextLatencyHint) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| FromAudioContextLatencyCategory(AudioContextLatencyCategory) | Creates a union value from a category. |
| FromDouble(double) | Creates a union value from a latency in seconds. |
| GetHashCode() | Returns the hash code for this instance. |
Equals overloads
Equals(AudioContextLatencyHint)
AudioContextUnions.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(AudioContextLatencyHint other)Parameters
otherAudioContextLatencyHint- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
AudioContextUnions.csFromAudioContextLatencyCategory(AudioContextLatencyCategory)
AudioContextUnions.csCreates a union value from a category.
public static AudioContextLatencyHint FromAudioContextLatencyCategory(AudioContextLatencyCategory value)FromDouble(double)
AudioContextUnions.csCreates a union value from a latency in seconds.
public static AudioContextLatencyHint FromDouble(double value)GetHashCode()
AudioContextUnions.csOperators
| Name | Description |
|---|---|
| operator ==(AudioContextLatencyHint, AudioContextLatencyHint) | Returns whether the two values are equal. |
| implicit operator AudioContextLatencyHint(AudioContextLatencyCategory) | Creates a union value from a category. |
| implicit operator AudioContextLatencyHint(double) | Creates a union value from a latency in seconds. |
| operator !=(AudioContextLatencyHint, AudioContextLatencyHint) | Returns whether the two values are different. |
operator ==(AudioContextLatencyHint, AudioContextLatencyHint)
AudioContextUnions.csReturns whether the two values are equal.
public static bool operator ==(AudioContextLatencyHint left, AudioContextLatencyHint right)op_Implicit overloads
implicit operator AudioContextLatencyHint(AudioContextLatencyCategory)
AudioContextUnions.csCreates a union value from a category.
public static implicit operator AudioContextLatencyHint(AudioContextLatencyCategory value)implicit operator AudioContextLatencyHint(double)
AudioContextUnions.csCreates a union value from a latency in seconds.
public static implicit operator AudioContextLatencyHint(double value)operator !=(AudioContextLatencyHint, AudioContextLatencyHint)
AudioContextUnions.csReturns whether the two values are different.
public static bool operator !=(AudioContextLatencyHint left, AudioContextLatencyHint right)