# Enum.DistanceAttenuationMode

Roblox Engine API enum from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- HTML page: https://rapi.sleaze.dev/enums/DistanceAttenuationMode/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/enums/DistanceAttenuationMode

Determines how an [`AudioEmitter`](https://rapi.sleaze.dev/classes/AudioEmitter.md) attenuates (fades out) as the distance between the [`AudioEmitter`](https://rapi.sleaze.dev/classes/AudioEmitter.md) and an interacting [`AudioListener`](https://rapi.sleaze.dev/classes/AudioListener.md) increases.

## Items

| Name | Value | Description |
| --- | --- | --- |
| `Custom` | 0 | Uses the developer-supplied `DistanceAttenuation` curve for gain rolloff. |
| `InverseTapered` | 1 | Volume attenuates according to a hybrid model which follows the `DistanceAttenuationMode.Inverse` model when close to the lower bound of [`AudioEmitter.DistanceAttenuationBounds`](https://rapi.sleaze.dev/classes/AudioEmitter.md) and the `DistanceAttenuationMode.LinearSquared` model when close to the upper bound of [`AudioEmitter.DistanceAttenuationBounds`](https://rapi.sleaze.dev/classes/AudioEmitter.md). This is done by taking the lesser of these two curves, such that the curve mostly follows an inverse relationship but tapers to silence at the maximum distance. |
| `Linear` | 2 | Volume attenuates between the bounds of [`AudioEmitter.DistanceAttenuationBounds`](https://rapi.sleaze.dev/classes/AudioEmitter.md) with a linear relationship. This is done by computing (`maxDistance` - `distance`) / (`maxDistance` - `minDistance`), where distance is the `Vector3.Magnitude` between the [`AudioEmitter`](https://rapi.sleaze.dev/classes/AudioEmitter.md)'s position and the [`AudioListener`](https://rapi.sleaze.dev/classes/AudioListener.md)'s position. |
| `LinearSquared` | 3 | Volume attenuates between the bounds of [`AudioEmitter.DistanceAttenuationBounds`](https://rapi.sleaze.dev/classes/AudioEmitter.md) with a linear-squared relationship. This is done by squaring the formula used to determine the volume when using `DistanceAttenuationMode.Linear`, which creates a parabolic curve with a steeper fade. |
| `Inverse` | 4 | Volume attenuates from the lower bound of [`AudioEmitter.DistanceAttenuationBounds`](https://rapi.sleaze.dev/classes/AudioEmitter.md) in an inverse manner, mirroring how sounds attenuate in the real world. This is done by computing (`minDistance`/`distance`), where `distance` is the `Vector2.Magnitude` between the [`AudioEmitter`](https://rapi.sleaze.dev/classes/AudioEmitter.md)'s position and the [`AudioListener`](https://rapi.sleaze.dev/classes/AudioListener.md)'s position. |

## Used by

Each entry lists the class, then the role and names of the members that use this type.

- [AudioEmitter](https://rapi.sleaze.dev/classes/AudioEmitter.md): property `DistanceAttenuationMode`
