Skip to content

Class AuditySampleEntry

One entry in a Wave Player’s sample list, plus its draw weight (on the entry, not the source, so one source can be common in one container and rare in another). The DarkEffekt.Audity.AuditySampleEntry.source is a single audio generator - a bare UnityEngine.AudioClip (default playback), a settings-bearing DarkEffekt.Audity.AuditySample (loop + trims), or any custom UnityEngine.Audio.IAudioGenerator (streamed). All three implement UnityEngine.Audio.IAudioGenerator; the accessors below classify one.

Declaration
[Serializable]
public sealed class AuditySampleEntry

True when a playable audio source is assigned.

Declaration
public bool HasSource { get; }

The settings-bearing sample, when the source is one (else null).

Declaration
public AuditySample Sample { get; }

A custom generator source - one that is neither a bare clip nor a sample (else null). A Sound Graph is deliberately excluded (compose graphs via a Subgraph node, not a per-voice streamed leaf), so it never bakes as a source.

Declaration
public IAudioGenerator CustomGenerator { get; }

The clip that supplies PCM (a bare clip, or a sample’s clip); null for a custom generator.

Declaration
public AudioClip EffectiveClip { get; }

Effective source tier (bare clips are in-memory samplers; custom generators stream).

Declaration
public AuditySourceMode EffectiveSourceMode { get; }

The audio source (AudioClip / AuditySample / custom IAudioGenerator). Stored as an Object reference because Unity has no interface-typed serialized field for Object references; the editor slot constrains the picker to UnityEngine.Audio.IAudioGenerator.

Declaration
public Object source

Random/Shuffle draw weight; 0 disables the entry.

Declaration
[Range(0, 1)]
public float weight