Skip to content

Class AudityTelemetry

Live playback telemetry hook, consumed by the editor’s Audition panel. When DarkEffekt.Audity.AudityTelemetry.Sink is null (always, in players) instances send no telemetry and the audio thread does no extra work. Callbacks arrive on the main thread at ~10 Hz per playing instance: voices, then parameters, then a Status terminator.

Declaration
public static class AudityTelemetry
Declaration
public static AudityTelemetry.ISink Sink

When true (and a sink is set) every playing instance also captures per-node and per-block render timing. Off by default: node timestamps are two clock reads per node per block, so tracing is opt-in from the Activity panel. Prefer DarkEffekt.Audity.AudityTelemetry.RequestTrace(object)/DarkEffekt.Audity.AudityTelemetry.ReleaseTrace(object) over writing this directly - the flag has several consumers (Activity window, perf HUD), and a bare write from one stomps the others.

Declaration
public static bool TraceRequested

Owner-tracked tracing: on while any owner holds a request.

Declaration
public static void RequestTrace(object owner)
Type Name
System.Object owner
Declaration
public static void ReleaseTrace(object owner)
Type Name
System.Object owner

A playing instance reported it finished (its generator returned Finished). Unlike the sink stream this is lifecycle, not telemetry: it fires whether or not telemetry is enabled, with the same instance id DarkEffekt.Audity.AudityTelemetry.ISink.OnTiming(System.Int32%2cSystem.Int32%2cSystem.Int32%2cSystem.Int64%2cSystem.Int32) uses. The editor auditioner listens - in edit mode the host never flips the hidden AudioSource’s isPlaying when a generator finishes, so without this signal a finished audition reads as playing forever.

Declaration
public static event Action<int> InstanceFinished

System.Action<System.Int32>