Skip to main content

Audio.DistanceCurveType

Enum

The curve that specifies how sound fades with the distance from Audio Component to the Audio Listener.****

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Index

Example

// @input Component.AudioComponent audio
var spatialAudio = script.audio.spatialAudio;
var distanceEffect = spatialAudio.distanceEffect;
distanceEffect.type = Audio.DistanceCurveType.Linear;

Enumeration Members

Inverse

Inverse: number

Inverse Curve ~ y(x) = (a/x)+b


InverseLogarithm

InverseLogarithm: number

Inverse Logarithmic Curve ~ +log(x)


Linear

Linear: number

Linear Curve ~ y(x) = ax+b


Logarithm

Logarithm: number

Logarithmic Curve ~ -log(x)