Class AudityBank
The residency registry: prepared Sample Set banks, loaded once, cached, refcounted and kept resident independent of any source - the “load bank → events reference it → unload bank” pattern. Residency is decoupled from binding: a bind against a warm bank is a pointer repoint plus a refcount; only DarkEffekt.Audity.AudityBank.Load(DarkEffekt.Audity.AuditySampleSet) pays the preparation cost. Warm your banks up front (level load, weapon equip screen) and a generic pooled source can rebind per acquire for free.
Identity is a content hash of the resolved Set (entries + trims + selection policy) - two identical inline Sets, or an asset and an inline copy of it, share one resident bank. Two reference sources keep a bank alive: the registry (one per outstanding DarkEffekt.Audity.AudityBank.Load(DarkEffekt.Audity.AuditySampleSet) handle) and playing instances (held from first use until the instance’s realtime side reports the bank fully idle). A released-but-still-referenced bank stays indexed by hash and is re-adopted by a new DarkEffekt.Audity.AudityBank.Load(DarkEffekt.Audity.AuditySampleSet) of the same content.
Main-thread only. Runtime banks prepare in-memory (sampler-tier) PCM; entries whose clips cannot supply PCM (streaming import mode, custom generators) are skipped with a warning - route those through compile-time content instead.
Assembly: DarkEffekt.Audity.Runtime
Section titled “Assembly: DarkEffekt.Audity.Runtime”public static class AudityBankProperties
Section titled “Properties”ColdBindPolicy
Section titled “ColdBindPolicy”Cold-bind handling for the Set-convenience overloads (see DarkEffekt.Audity.AudityColdBindPolicy).
public static AudityColdBindPolicy ColdBindPolicy { get; set; }Methods
Section titled “Methods”Load(AuditySampleSet)
Section titled “Load(AuditySampleSet)”Prepares (or re-adopts) the resident bank for set and
returns a handle holding one registry reference. Prepare-if-cold,
repoint-if-warm: a warm content hash returns instantly. Release the handle
with DarkEffekt.Audity.AudityBank.Release(DarkEffekt.Audity.AudityBankHandle) when this usage is done - live binds and voices
keep the bank alive independently.
public static AudityBankHandle Load(AuditySampleSet set)Returns
Section titled “Returns”DarkEffekt.Audity.AudityBankHandle
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Audity.AuditySampleSet | set |
Load(Object)
Section titled “Load(Object)”Widening convenience: promotes a Set asset / clip / sample / generator to a Set and loads it.
public static AudityBankHandle Load(Object source)Returns
Section titled “Returns”DarkEffekt.Audity.AudityBankHandle
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
UnityEngine.Object |
source |
IsReady(AudityBankHandle)
Section titled “IsReady(AudityBankHandle)”True once every entry’s PCM is resident. Cold entries (clips still loading asynchronously) finish here - poll from a coroutine/await loop, or rely on DarkEffekt.Audity.AuditySource’s queue-until-ready bind path.
public static bool IsReady(AudityBankHandle handle)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Audity.AudityBankHandle | handle |
Release(AudityBankHandle)
Section titled “Release(AudityBankHandle)”Drops the handle’s registry reference. The bank stays resident while any other reference (registry or playing instance) holds it, stays indexed by hash while draining, and frees only when everything lets go.
public static void Release(AudityBankHandle handle)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Audity.AudityBankHandle | handle |