Skip to content

Struct AudityChannelRemapSettings

Per-clip channel routing: which clip channel feeds each speaker of a declared target layout. The escape hatch for count-IS-layout’s guess (a 5.0 surround bounce whose channel order isn’t Unity’s, an L C R stem playing as L R): the player’s wire becomes DarkEffekt.Audity.AudityChannelRemapSettings.targetChannels wide and each speaker plays exactly one clip channel or silence. Sampler-family tiers only - streamed playback pulls through SAP’s own layout and ignores this (the planner reroutes readable clips to Paged). Off (DarkEffekt.Audity.AudityChannelRemapSettings.targetChannels 0) is the automatic count-IS-layout behavior.

Declaration
[Serializable]
public struct AudityChannelRemapSettings
Declaration
public bool Enabled { get; }

Declared wire layout (a channel count with speaker semantics: 1, 2, 4, 5, 6, 8). 0 = automatic (no remap).

Declaration
public int targetChannels

speakerSource[speaker] = clip channel feeding that speaker (interleaved index), -1 = silent. Fixed 8-wide regardless of the target layout so assignments survive layout switches and multi-edit sees one shape; entries past DarkEffekt.Audity.AudityChannelRemapSettings.targetChannels are ignored.

Declaration
public int[] speakerSource

Source clip channel for a speaker, -1 = silent (bounds-safe).

Declaration
public int Source(int speaker)

System.Int32

Type Name
System.Int32 speaker

The map in DarkEffekt.Audity.AudityClipDesc’s packed nibble form: speaker c’s nibble is 0 for silent, else source channel + 1. Sources the clip doesn’t have (the clip was swapped or reimported narrower since authoring) pack as silent and set droppedStale; any is false when no speaker maps at all (packed 0 = no remap, so an all-silent authoring is indistinguishable from off - callers warn and disable).

Declaration
public uint Pack(int clipChannels, out bool any, out bool droppedStale)

System.UInt32

Type Name
System.Int32 clipChannels
System.Boolean any
System.Boolean droppedStale