How Volume Boosting Works

A volume booster is a chain of processing stages, each solving a problem created by the one before it. Understanding the order explains why a good booster can go to 600% while a naive one distorts at 150%.

The chain, stage by stage

  1. Source

    Audio enters as a stream of samples — numbers describing the waveform. In a browser this comes from a media element, a decoded file buffer, or a captured stream.

  2. Gain

    Every sample is multiplied by a fixed number. Multiply by 2 and the signal is 6 dB louder. This is the actual boosting, and on its own it clips as soon as any peak exceeds the ceiling.

  3. Compression

    A compressor reduces the level of anything above a threshold, with an attack and release determining how quickly it responds. This holds peaks down so the gain stage has somewhere to go.

  4. Soft clipping

    A waveshaper applies a curve that rounds off peaks approaching the ceiling instead of squaring them. Rounding produces gentler harmonics than a hard corner does, which is why it sounds warm rather than harsh.

  5. Analysis and metering

    An analyser measures the output so the interface can show how much headroom remains and how hard the limiter is working.

  6. Output

    The processed signal goes to the audio device. Everything above happens in real time, per audio block, on your device.

Why the order matters

Compression must come after gain, because its job is catching what the gain stage pushes too high. Put it first and it has nothing to catch. Soft clipping must come last, as a final safety net for transients too fast for the compressor to respond to.

Getting this order wrong is the difference between a booster that distorts at 150% and one that stays usable at 600%.

Frequently asked questions

Does this happen on a server?

No. The Web Audio API runs entirely in your browser, on your device. No audio is transmitted anywhere.

Why do some boosters sound worse than others?

Usually because they apply gain with no limiting, so anything above unity clips immediately. The processing after the gain stage is what determines quality.

Last updated