Contents

distanceModelParameters

An effect that changes sound as it carries over a distance.

Declaration

var distanceModelParameters: PHASEDistanceModelParameters? { get set }

Discussion

Similar to a Doppler effect, this property changes how an audio source sounds as its distance between the listener increases or decreases in 3D space. The available options are:

PHASEGeometricSpreadingDistanceModelParameters

Create a realistic effect by dissipating certain frequency ranges of the audio spectrum differently with distance.

PHASEEnvelopeDistanceModelParameters

Take full control of the sound’s volume by graphing its loudness using points and curves over the distance.

Programmatically Check Sound Dissipation

After setting a value for this property, you can move a looping sound source to tweak the effect to your app’s particular requirements. The following code programmaticaly moves a looping source away from the listener along the z-axis: