FloatOrMakeupGainOptions Struct

The (float or MakeupGainOptions) union of the makeup gain of a DynamicsCompressorOptions (https://webaudio.github.io/web-audio-api/#dom-dynamicscompressoroptions-makeupgain): a gain in dB, or the automatic makeup gain.

public readonly struct FloatOrMakeupGainOptions : IEquatable<FloatOrMakeupGainOptions>
Implements

Properties

NameDescription
DecibelsGets the makeup gain in dB when the value is a number, otherwise null.
OptionGets the option when the value is a MakeupGainOptions, otherwise null.
ValueGets the value: a MakeupGainOptions or a Single.

Gets the makeup gain in dB when the value is a number, otherwise null.

public float? Decibels { get; }

Property value

float?

Gets the option when the value is a MakeupGainOptions, otherwise null.

public MakeupGainOptions? Option { get; }

Property value

MakeupGainOptions?

Gets the value: a MakeupGainOptions or a Single.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(FloatOrMakeupGainOptions)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.
FromMakeupGainOptions(MakeupGainOptions)Creates a union value from an option.
FromSingle(float)Creates a union value from a gain in dB.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(FloatOrMakeupGainOptions)

DynamicsCompressorNode.cs

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

public bool Equals(FloatOrMakeupGainOptions other)
Parameters
other FloatOrMakeupGainOptions
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.

FromMakeupGainOptions(MakeupGainOptions)

DynamicsCompressorNode.cs

Creates a union value from an option.

public static FloatOrMakeupGainOptions FromMakeupGainOptions(MakeupGainOptions value)

FromSingle(float)

DynamicsCompressorNode.cs

Creates a union value from a gain in dB.

public static FloatOrMakeupGainOptions FromSingle(float value)

Parameters

value float

Returns

FloatOrMakeupGainOptions

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 ==(FloatOrMakeupGainOptions, FloatOrMakeupGainOptions)Returns whether the two values are equal.
implicit operator FloatOrMakeupGainOptions(MakeupGainOptions)Creates a union value from an option.
implicit operator FloatOrMakeupGainOptions(float)Creates a union value from a gain in dB.
operator !=(FloatOrMakeupGainOptions, FloatOrMakeupGainOptions)Returns whether the two values are different.

operator ==(FloatOrMakeupGainOptions, FloatOrMakeupGainOptions)

DynamicsCompressorNode.cs

Returns whether the two values are equal.

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

op_Implicit overloads

implicit operator FloatOrMakeupGainOptions(MakeupGainOptions)

DynamicsCompressorNode.cs

Creates a union value from an option.

public static implicit operator FloatOrMakeupGainOptions(MakeupGainOptions value)

implicit operator FloatOrMakeupGainOptions(float)

DynamicsCompressorNode.cs

Creates a union value from a gain in dB.

public static implicit operator FloatOrMakeupGainOptions(float value)
Parameters
value float
Returns

FloatOrMakeupGainOptions

operator !=(FloatOrMakeupGainOptions, FloatOrMakeupGainOptions)

DynamicsCompressorNode.cs

Returns whether the two values are different.

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