AI Tutor
You hit play on a dense session with thirty plugins, and your monitors suddenly erupt with sharp clicks, pops, or a stuttering buzz.
This glitch isn't caused by a faulty cableβ€”it is a buffer underrun, a digital audio interruption caused when your computer's processor falls behind real-time playback.

The Audio Buffer

An audio buffer is a temporary chunk of system memory (RAM) that holds audio samples before they are sent to your digital-to-analog converter (DAC).
Your central processing unit (CPU) calculates complex effects and virtual instruments in uneven bursts, but your DAC must output samples at an exact, unwavering speed.
The buffer acts like a water reservoir: it absorbs uneven processing bursts so your speakers receive an uninterrupted stream of sound.
Holding samples in memory prevents dropouts, but how much time delay does this safety net actually create?

Calculating Buffer Latency

Latency is the time delay between audio entering a digital system and exiting it.
Because each sample takes a fraction of a second determined by the sample rate (the number of audio snapshots taken per second), one-way buffer latency follows a direct mathematical formula: LatencyΒ (seconds)=BufferΒ SizeΒ (samples)SampleΒ RateΒ (Hz)\text{Latency (seconds)} = \frac{\text{Buffer Size (samples)}}{\text{Sample Rate (Hz)}}
For instance, running a buffer of 256Β samples256\text{ samples} at a standard sample rate of 44,100Β Hz44,100\text{ Hz} produces roughly 5.8Β ms5.8\text{ ms} of buffer delay: Latency=25644,100β‰ˆ0.0058Β s=5.8Β ms\text{Latency} = \frac{256}{44,100} \approx 0.0058\text{ s} = 5.8\text{ ms}