Move synth pitch modulation to control rate — fix playback hiccups (v0.4.4)
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>
This commit is contained in:
@@ -22,8 +22,8 @@ android {
|
||||
// (android.media.midi) and AAudio low-latency audio we rely on.
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
versionCode = 10
|
||||
versionName = "0.4.3"
|
||||
versionCode = 11
|
||||
versionName = "0.4.4"
|
||||
|
||||
// We provide our own instrumentation runner if/when tests are added.
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
Reference in New Issue
Block a user