demo · v131

worklet under increasing load: induce underruns

An AudioWorkletNode running a CPU-busy DSP path. The slider sets how many synthetic milliseconds each process() call burns. Push it past your CPU's tolerance and the playback stats start counting fallbackFramesDuration. This is the DAW heart-attack monitor.

0 ms
frames rendered
0
expected frames
0
deviation
0
fallback duration
0
total duration
0s

When the load slider pushes the worklet's process() over the render quantum budget (≈2.7ms for 128 frames at 48kHz), the audio thread can't deliver frames fast enough and the stats count it.

the api

const stats = ctx.playbackStats;     // AudioPlaybackStats
console.log(stats.framesRendered);
console.log(stats.fallbackFramesDuration);  // total underrun time in seconds
console.log(stats.fallbackFramesEvents);    // number of distinct underrun events
console.log(stats.totalFramesDuration);

see also