Files
JIANT/tests
Claude 3e6d723c78 Replace the spike-driven load budget with an averaged overload guard
The load budget (load_tight) was set by one 2.9 ms half over 65 % and
cleared after 16 under 60 %, and a voice was shed after two halves in a
row over 80 %. A half's measured share is noisy: a chord's note-ons, a
cache miss or a UI frame nested in the render pushed it over and the
budget closed for 50 ms, or a release tail was faded, with nothing late.

voice.c load_half, fed by audio.c at the end of every half with the
render's share (TIMER5 nested in it excluded, as before), keeps an EMA
over ~32 halves (93 ms) and a run count. The guard trips on an average
past 85 %, or on three halves in a row past 92 % (a load that keeps the
audio late); one spike never trips it. Tripped, it caps the shared
voices at what sounds (at least 4: a lead a track) and lets go a voice
for each half second of calm under 70 % with no such run, until the cap
is the budget's again. LOAD ECO keeps its earlier budget: 65 / 75 / 50.
The extra voices (12) open and close on the same average with the
nested interrupts included (50 / 65 %), not on one half.

The hard shed stays only as the last resort: a half that really came
late (the DMA moved on while it rendered) fades one voice. The console
status shows guard_trips and load_avg_pct.

audio_test: the run of three, the average, a 95 % spike in a 70 % song
(never trips), the 75 % hold and the half-second recovery; the DMA late
half sheds. 157 golden renders unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
2026-10-23 07:29:46 +00:00
..
2026-10-06 13:15:44 +09:00
2026-10-05 23:16:53 +09:00
2026-10-08 11:11:01 +09:00
2026-10-08 11:11:01 +09:00
2026-10-08 11:11:01 +09:00
2026-10-05 23:16:53 +09:00
2026-10-05 23:16:53 +09:00
2026-10-08 11:11:01 +09:00
2026-10-08 11:11:01 +09:00
2026-10-07 00:29:46 +09:00