v145 · WebAudio · Quantum Sweep
Render quantum sweep
Recreate an AudioContext at each supported render quantum (32, 64, 128, 256, 512) and report computed latency, CPU budget per quantum, and underrun risk. Pick the right knob for live performance vs. battery.
controls
code
const ctx = new AudioContext({ renderSizeHint: 32 }); // Chrome 145
console.log('rendering at', ctx.renderQuantumSize, 'frames');
// Use cases:
// 32 — lowest-latency input monitoring (drum machines, live FX)
// 128 — default, balanced
// 512 — battery-friendly background playback