AudioNodeEmitterDecayModel AudioNodeEmitterDecayModel AudioNodeEmitterDecayModel AudioNodeEmitterDecayModel Class

Definition

Represents the model used to compute the distance-based attenuation of a signal from an AudioNodeEmitter.

public : sealed class AudioNodeEmitterDecayModel : IAudioNodeEmitterDecayModelpublic sealed class AudioNodeEmitterDecayModel : IAudioNodeEmitterDecayModelPublic NotInheritable Class AudioNodeEmitterDecayModel Implements IAudioNodeEmitterDecayModel// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

Create an instance of this class by calling CreateCustom or CreateNatural.

Properties

Kind Kind Kind Kind

Gets a value indicating the type of the decay model.

public : AudioNodeEmitterDecayKind Kind { get; }public AudioNodeEmitterDecayKind Kind { get; }Public ReadOnly Property Kind As AudioNodeEmitterDecayKind// You can use this property in JavaScript.

Remarks

Create a Natural decay model by calling CreateNatural. Create a Custom decay model by calling CreateCustom.

MaxGain MaxGain MaxGain MaxGain

Gets the maximum gain applied to the signal as a result of the decay model.

public : double MaxGain { get; }public double MaxGain { get; }Public ReadOnly Property MaxGain As double// You can use this property in JavaScript.
Value
double double double double

The maximum gain applied to the signal as a result of the decay model.

Remarks

Specify the maximum gain of an AudioNodeEmitterDecayModel by calling CreateCustom or CreateNatural.

MinGain MinGain MinGain MinGain

Gets the minimum gain applied to the signal as a result of the decay model.

public : double MinGain { get; }public double MinGain { get; }Public ReadOnly Property MinGain As double// You can use this property in JavaScript.
Value
double double double double

The minimum gain applied to the signal as a result of the decay model.

Remarks

Specify the minimum gain of an AudioNodeEmitterDecayModel by calling CreateCustom or CreateNatural.

NaturalProperties NaturalProperties NaturalProperties NaturalProperties

Gets the properties of a natural AudioNodeEmitterDecayModel.

public : AudioNodeEmitterNaturalDecayModelProperties NaturalProperties { get; }public AudioNodeEmitterNaturalDecayModelProperties NaturalProperties { get; }Public ReadOnly Property NaturalProperties As AudioNodeEmitterNaturalDecayModelProperties// You can use this property in JavaScript.

Remarks

Set the properties of a natural decay model by calling CreateNatural.

Methods

CreateCustom(Double, Double) CreateCustom(Double, Double) CreateCustom(Double, Double) CreateCustom(Double, Double)

Creates a new AudioNodeEmitterDecayModel that uses the specified minimum and maximum gain values to compute distance-based attenuation of a signal from an AudioNodeEmitter.

public : static AudioNodeEmitterDecayModel CreateCustom(double minGain, double maxGain)public static AudioNodeEmitterDecayModel CreateCustom(Double minGain, Double maxGain)Public Static Function CreateCustom(minGain As Double, maxGain As Double) As AudioNodeEmitterDecayModel// You can use this method in JavaScript.
Parameters
minGain
double Double Double Double

The minimum gain level for the signal.

maxGain
double Double Double Double

The maximum gain level for the signal.

Returns

Remarks

The minGain parameter value must be greater than or equal to 1.5843910-5, and the *maxGain parameter must be less than or equal to 3.98. In decibels, these limits map to a range of -96 dB to 12 dB. Convert from a decibel value to amplitude scale using the equation gain = 10(dB/20) where dB is the decibel value you wish to convert.

CreateNatural(Double, Double, Double, Double) CreateNatural(Double, Double, Double, Double) CreateNatural(Double, Double, Double, Double) CreateNatural(Double, Double, Double, Double)

Creates an AudioNodeEmitterDecayModel with a natural roll-off model using a distance-squared formula.

public : static AudioNodeEmitterDecayModel CreateNatural(double minGain, double maxGain, double unityGainDistance, double cutoffDistance)public static AudioNodeEmitterDecayModel CreateNatural(Double minGain, Double maxGain, Double unityGainDistance, Double cutoffDistance)Public Static Function CreateNatural(minGain As Double, maxGain As Double, unityGainDistance As Double, cutoffDistance As Double) As AudioNodeEmitterDecayModel// You can use this method in JavaScript.
Parameters
minGain
double Double Double Double

The minimum gain applied to the signal.

maxGain
double Double Double Double

The maximum gain applied to the signal.

unityGainDistance
double Double Double Double

The distance at which the gain of the signal is unaffected by decay.

cutoffDistance
double Double Double Double

The distance at which the gain is minGain.

Returns

Remarks

The distance values for unityGainDistance and cutoffDistance are expressed in meters, but can be scaled by setting the AudioNodeEmitter.DistanceScale property.

The minGain parameter value must be greater than or equal to 1.5843910-5, and the *maxGain parameter must be less than or equal to 3.98. In decibels, these limits map to a range of -96 dB to 12 dB. Convert from a decibel value to amplitude scale using the equation gain = 10(dB/20) where dB is the decibel value you wish to convert.