Expand description
§aether-core
Hard real-time modular DSP engine — lock-free graph scheduler, generational arena, and zero-allocation buffer pool.
64-sample buffer · 48 kHz · ≤1.33 ms deadline · Zero allocations · Lock-free§Architecture
Control thread RT audio thread
────────────── ───────────────
AudioGraph (add/remove nodes) Scheduler::process_block()
│ │
│ CommandRing (SPSC) ├─ drain CommandRing
└────────────────────────────────►│
├─ iterate sorted NodeArena
├─ borrow buffers from BufferPool
└─ call DspNode::process() per node§Real-time guarantees
| Rule | Enforcement |
|---|---|
| No heap allocation | Pre-allocated arena + buffer pool |
| No locks | SPSC ring buffer (ringbuf) |
| No I/O | All I/O on control/tokio threads |
| Bounded execution | Flat topo-sorted array, ≤32 commands/tick |
§Quick start
See node::DspNode to implement a processing node, [graph::AudioGraph]
to build a patch, and scheduler::Scheduler to drive the RT loop.
Modules§
- arena
- Generational arena allocator.
- buffer_
pool - Pre-allocated audio buffer pool.
- command
- Lock-free command protocol between the control thread and the RT audio thread.
- graph
- Directed Acyclic Graph (DAG) for DSP routing.
- node
- Node abstraction for the DSP graph.
- param
- Sample-accurate parameter automation.
- scheduler
- Real-time audio scheduler.
- state
- State continuity framework.
Constants§
- BUFFER_
SIZE - Audio buffer size in samples. Hard real-time constraint: 64 samples @ 48kHz = 1.33ms deadline.
- COMMAND_
RING_ CAPACITY - Command ring buffer capacity.
- MAX_
BUFFERS - Maximum number of audio buffers in the pool.
- MAX_
COMMANDS_ PER_ TICK - Maximum commands processed per audio callback. Bounds mutation cost.
- MAX_
INPUTS - Maximum number of inputs per node. Kept small to fit in cache lines.
- MAX_
NODES - Maximum number of nodes in the arena. Pre-allocated at startup.