ORIGINAL ENGINEERING RESEARCH · 28 AUGUST 2026

Browser audio limiter benchmark

We tested one narrowly defined claim: whether the limiter used by the Hearably web preview keeps deterministic synthetic PCM samples at or below its configured 0.95 sample-peak ceiling.

PASS 4 cases · 0 samples above the allowed tolerance

This is not a hearing-safety test, a website-compatibility test, a competitor comparison, or proof that aggressive limiting is inaudible.

Reproduce the test

Download the three files below into the same folder, then run node run-benchmark.mjs there. The kit needs Node.js and its built-in modules only: no account, repository access or package install. The original run used Node.js 22.16.0.

On macOS or Linux with curl, start in an empty folder:

base=https://hearably.app/benchmarks/browser-audio-limiter-2026-08-28
curl -fSLO "$base/run-benchmark.mjs"
curl -fSLO "$base/limiter-worklet.mjs"
curl -fSLO "$base/results.json"
node run-benchmark.mjs

The runner checks the snapshot’s SHA-256 before loading it and processes the fixed signals in 128-sample blocks. It writes JSON/CSV into a new limiter-results-… folder and leaves the reference files intact. Exit code 0 means all checks passed; code 1 indicates a failure. The full source is available to inspect before running.

The August report below is unchanged. Its pass flag checks sample peaks against 0.950001. The September reproduction kit additionally checks finite output, the 239-sample delay, the unchanged sub-ceiling impulse, the 4:1 stereo ratio and agreement with the original numeric results. Machine-dependent timing is excluded from that comparison.

Raw case results

Case Input peak Output peak Delay Over ceiling Result
sub ceiling impulseA single 0.5 sample verifies unity behavior below the ceiling. 0.500000 0.500000 239 samples
4.9792 ms
0 PASS
two x impulseA single 2.0 sample exercises the most abrupt over-ceiling transient. 2.000000 0.950000 239 samples
4.9792 ms
0 PASS
stereo linked impulseA 2.0 left / 0.5 right impulse verifies stereo-linked gain reduction. 2.000000 0.950000 239 samples
4.9792 ms
0 PASS
overdriven 1khz toneA 2.0-peak 1 kHz tone exercises sustained limiting after a sudden start. 2.000000 0.950000 239 samples
4.9792 ms
0 PASS

What changed because of the benchmark

The first run exposed a defect in the attack calculation: repeatedly dividing the remaining gain gap by the full look-ahead length produced an exponential approach, so the envelope did not reach the required gain before a sudden peak left the delay line. The implementation now schedules a fixed ramp backward across the delayed samples and takes the minimum where future-peak ramps overlap.

The regression test includes a 2.0 single-sample impulse—the abrupt case that previously defeated the stated ceiling. Its measured output peak is 0.950000, with no samples above the tolerance.

Does the browser’s built-in compressor already use look-ahead?

Yes. The Web Audio specification defines DynamicsCompressorNode with fixed look-ahead. Look-ahead alone does not establish a particular output ceiling: the gain calculation, settings and input still matter. This report tests one custom worklet, not the built-in compressor, and does not establish that our approach sounds better or performs better.

What this result does—and does not—show

  • This isolates one DSP worklet; it does not test tab capture, DRM, websites, codecs, speakers, headphones, or perceived loudness.
  • Synthetic sample-peak compliance does not prove transparent sound or safe acoustic listening levels.
  • The Node throughput result is machine-dependent and is not used as a product-performance claim.
  • The benchmark does not compare Hearably with third-party extensions.

Sample-peak control is only one layer. A limiter cannot repair distortion already present in a source, prevent a speaker or headphone amplifier from overloading, guarantee comfortable loudness, or make every protected playback route capturable. Start with moderate gain and compare with bypass.

Standards and implementation references