# Bus System Pre-allocated at `SynthesisEngine.start()`. Never resized at runtime. ## Memory Layout ```swift // Audio buses: 2D array, [busIndex][sampleIndex] var audioBuses: [[Float]] // [numAudioBuses][blockSize] // Control buses: 1D array, one value per bus var controlBuses: [Float] // [numControlBuses] ``` ## Reserved Bus Layout ``` Audio buses: 0 ..< numOutputChannels → hardware output numOutputChannels ..< numOutputChannels + numInputChannels → hardware input numOutputChannels + numInputChannels ..< numAudioBuses → user buses Control buses: 0 ..< numControlBuses → all user-addressable (none reserved) ``` ## Per-Cycle Semantics At the top of each render callback: 1. **Zero all audio buses** — `audioBuses[i] = [Float](repeating: 0, count: blockSize)` 2. **Copy hardware input** — write input samples into the reserved input buses 3. **Retain control buses** — no zeroing; values persist until overwritten At the bottom of each render callback: 4. **Copy output buses to hardware** — read buses 0..