On-device profiling (worst case: 4 channels x 3 oscillators + cutoff & pitch modulation, dense pattern at 200 BPM) showed the render callback averaging 2.8ms against a 2.0ms budget with continuous xruns — the hiccups. The cost was the per-sample Math.pow used for pitch modulation across 3 oscillators x many voices. Recompute modulated oscillator pitch at control rate (every 16 samples, like the filter cutoff) instead of per sample; LFO/envelopes move slowly enough that this is inaudible. Render dropped to ~1.27ms avg with zero new xruns. No crashes under load (the ConcurrentHashMap + stable SVF filter fixes from 0.4.3 hold). Patch bump to 0.4.4 (versionCode 11). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5.0 KiB
5.0 KiB