Docs / Audio

Glossary: DistanceAudioEffect

The properties of DistanceAudioEffect, in alphabetical order.

Color legend plain property

Lowers the volume and closes a low-pass filter as the emitter moves away from the listener.

DistanceAudioEffect derives from BaseAudioEffect and has its members too. The positional sound page shows it in context, with code.

Names are colored by what they are: a plain property, a method or an event.

Properties

DemoEmitterPosition →

Vector3 · Where the sound is in demo mode, around a listener at the origin.

DistanceCutoffAttenuationFunction →

BaseShapingFunction · Turns how close the emitter is into the low-pass cutoff, from DistanceMinimumCutoffHz at 0 to DistanceMaximumCutoffHz at 1. null sets the default straight line.

DistanceMaximumCutoffHz →

float · The cutoff at the listener, from 0 to 20 000 Hz. 20 000 Hz by default, which leaves a close sound open. Setting it below the minimum lowers the minimum too.

DistanceMinimumCutoffHz →

float · The cutoff at the audible distance, from 0 to 20 000 Hz. 100 Hz by default. Setting it above the maximum raises the maximum too.

DistanceVolumeAttenuationFunction →

BaseShapingFunction · Turns how close the emitter is, 1 at the listener to 0 at the audible distance, into the gain. null sets the default straight line.

IsDemoMode →

bool · Measures the distance from DemoEmitterPosition to the origin instead of from the emitter to the listener. See demo mode.

LoudnessDb →

float · The level of the sound one meter away, in dB. Sets MaxAudibleDistanceMeters. Negative values are taken as 0. 0 by default, so the sound is silent past one meter until you set it.

MaxAudibleDistanceMeters →

float · Read-only. How far the sound carries: where its level falls to HearingMinimumDb, with the air absorption. Worked out when LoudnessDb is set.