AudioContextRenderSizeHint Struct

The (AudioContextRenderSizeCategory or unsigned long) union of the render quantum size hint of a context (https://webaudio.github.io/web-audio-api/#dom-audiocontextoptions-rendersizehint).

public readonly struct AudioContextRenderSizeHint : IEquatable<AudioContextRenderSizeHint>
Implements

Properties

NameDescription
CategoryGets the category when the value is a category, otherwise null.
SizeGets the number of sample frames when the value is a number, otherwise null.
ValueGets the value: an AudioContextRenderSizeCategory or a UInt32.

Gets the category when the value is a category, otherwise null.

public AudioContextRenderSizeCategory? Category { get; }

Gets the number of sample frames when the value is a number, otherwise null.

public uint? Size { get; }

Property value

uint?

Gets the value: an AudioContextRenderSizeCategory or a UInt32.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(AudioContextRenderSizeHint)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.
FromAudioContextRenderSizeCategory(AudioContextRenderSizeCategory)Creates a union value from a category.
FromUInt32(uint)Creates a union value from a number of sample frames.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(AudioContextRenderSizeHint)

AudioContextRenderSizeHint.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(AudioContextRenderSizeHint other)
Parameters
other AudioContextRenderSizeHint
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

FromAudioContextRenderSizeCategory(AudioContextRenderSizeCategory)

AudioContextRenderSizeHint.cs

Creates a union value from a category.

public static AudioContextRenderSizeHint FromAudioContextRenderSizeCategory(AudioContextRenderSizeCategory value)

Creates a union value from a number of sample frames.

public static AudioContextRenderSizeHint FromUInt32(uint value)

Parameters

value uint

Returns

AudioContextRenderSizeHint

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Operators

NameDescription
operator ==(AudioContextRenderSizeHint, AudioContextRenderSizeHint)Returns whether the two values are equal.
implicit operator AudioContextRenderSizeHint(AudioContextRenderSizeCategory)Creates a union value from a category.
implicit operator AudioContextRenderSizeHint(uint)Creates a union value from a number of sample frames.
operator !=(AudioContextRenderSizeHint, AudioContextRenderSizeHint)Returns whether the two values are different.

operator ==(AudioContextRenderSizeHint, AudioContextRenderSizeHint)

AudioContextRenderSizeHint.cs

Returns whether the two values are equal.

public static bool operator ==(AudioContextRenderSizeHint left, AudioContextRenderSizeHint right)

op_Implicit overloads

implicit operator AudioContextRenderSizeHint(AudioContextRenderSizeCategory)

AudioContextRenderSizeHint.cs

Creates a union value from a category.

public static implicit operator AudioContextRenderSizeHint(AudioContextRenderSizeCategory value)

implicit operator AudioContextRenderSizeHint(uint)

AudioContextRenderSizeHint.cs

Creates a union value from a number of sample frames.

public static implicit operator AudioContextRenderSizeHint(uint value)
Parameters
value uint
Returns

AudioContextRenderSizeHint

operator !=(AudioContextRenderSizeHint, AudioContextRenderSizeHint)

AudioContextRenderSizeHint.cs

Returns whether the two values are different.

public static bool operator !=(AudioContextRenderSizeHint left, AudioContextRenderSizeHint right)