Skip to content

Class AudityMountSpec

The physical state of a pooled mount for one DarkEffekt.Audity.AudityPlayback.Play(DarkEffekt.Audity.AudityGraph%2cUnityEngine.Vector3%2cDarkEffekt.Audity.AudityQuantize%2cSystem.Single%2cUnityEngine.Audio.AudioMixerGroup%2cDarkEffekt.Audity.AudityMountSpec): the host AudioSource knobs that decide how the play sits in the world. Pooled mounts are hidden and author-less, so this spec is the only way to set these knobs - and every lease applies its spec in full, so a play never inherits the previous lease’s settings. Scene-authored AudioSources are untouched by design: there the Inspector is the spec (the one-property contract).

The default spec is 2D: full volume routed straight to the listener, position ignored by the panner. DarkEffekt.Audity.AudityMountSpec.Spatial(System.Single%2cSystem.Single) is the point-in-the-world one-shot. A class, not a struct, so partial object initializers keep every unset knob at its default; build one spec per kind of sound and reuse it across plays.

Declaration
public sealed class AudityMountSpec

Mount volume, 0..1. Post-generator, like any AudioSource volume.

Declaration
public float volume

0 = 2D (position ignored), 1 = full host 3D panning and distance attenuation.

Declaration
public float spatialBlend

Distance attenuation shape (3D only).

Declaration
public AudioRolloffMode rolloffMode

Distance of full volume, in metres (3D only).

Declaration
public float minDistance

Where attenuation stops, in metres (3D only).

Declaration
public float maxDistance

Host Doppler amount (3D only). Defaults to 0, not Unity’s 1: a pooled mount never moves, so the only Doppler it could have is the listener’s own motion warping a stationary sound. Opt in deliberately.

Declaration
public float dopplerLevel

Speaker spread angle in degrees, 0..360 (3D only).

Declaration
public float spread

A host-3D point one-shot: full spatial blend with the given attenuation range.

Declaration
public static AudityMountSpec Spatial(float minDistance = 1, float maxDistance = 500)

DarkEffekt.Audity.AudityMountSpec

Type Name
System.Single minDistance
System.Single maxDistance