Expand description
Compiled, immutable audio render plan — Phase 2 of LOCKLESS.md.
A RenderPlan is the flattened, topologically ordered form of the engine’s
per-cycle task graph plus the AudioIO port network. It is built on the
control thread (see the builder contract in LOCKLESS.md), published with
arc_swap, and executed by the cycle executor with count-up dependency
counters. Nothing in it is behind a mutex: while a plan is alive it never
mutates.
Key invariants (checked by RenderPlan::verify after every compile):
- Single-producer chains. Every arena buffer has at least one writer,
and multiple writers of the same buffer always form a dependency chain
(e.g. an input
Sumnode writes a track input, then the track task adds clip audio in place). Two nodes that could run concurrently never write the same buffer. - Topological order. Except for
forcednodes (feedback loops, broken deliberately — the same situation today’sfinished-flag scheduler resolves with its force-progress fallback), every edge points from a lower node index to a higher one, so sequential execution is a plain iteration and the arena can be split safely at each output index.
Structs§
- Render
Plan - A compiled, immutable render plan. Owns the whole buffer arena.
Enums§
- Op
- What a plan node does when executed.
Type Aliases§
- Buffer
Id - Index into
RenderPlan::buffers. - NodeId
- Index into
RenderPlan::nodes. - Plan
Slot - The atomically published plan slot. The dispatcher pulls with
load_full()at cycle start; the builder stores newly compiled plans. - Shared
Plan - A plan shared across the dispatcher, workers and hardware drivers.