mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-01 14:36:50 -06:00
Once a session has any edit.values entry (click settings, Real-Time Properties, clip effects), MixEngine::render allocated every block, although the crate docs say steady-state rendering doesn't: every audio clip formatted two Strings and collected a Vec to look up its clip effects, and every MIDI clip formatted four keys for its Real-Time Properties. Strips render on rayon's workers while the audio callback waits for them, or on the audio thread itself below 4 strips. Lookups now format their keys on the stack (Key) and range over edit.values with &str bounds. A new test checks that Real-Time Properties still reach the instrument. A counting allocator on all threads, over 1000 blocks of the demo session with a clip effect on every clip and Real-Time Properties on every track, saw 10 to 43 allocations per block before and none after, apart from rayon's job queue (a new chunk every 63 blocks) and the one-time setup of each clip's effects when it first plays.