An audio buffer is a block of memory that holds a fixed number of digital audio samples while they move between the audio hardware and the software that records, processes or plays them. In digital audio, the buffer size, usually set in samples per channel, is the main control over the balance between low latency and reliable, dropout-free playback.
Audio hardware delivers and consumes samples at a perfectly steady rate, while a computer processes them in irregular bursts between other tasks. The buffer absorbs that mismatch. If the software fails to fill a buffer before the hardware needs it, the result is a buffer underrun, heard as a click, crackle or short gap.
How audio buffering works
Most audio drivers use double buffering or a ring buffer. While the hardware plays one buffer through the digital-to-analog converter, the software computes the next one. When the hardware finishes, it raises an interrupt or callback, the buffers swap roles, and the cycle repeats every buffer period.
The software therefore has a hard deadline equal to the duration of one buffer. That duration is the buffer size divided by the sample rate: 256 samples at 48 kHz last about 5.3 milliseconds. Every plug-in, virtual instrument and mixing operation in the project must finish within that window, every time, for the audio to stay continuous.
Recording works in the opposite direction. The analog-to-digital converter fills an input buffer, the driver hands it to the application, and the application writes it to disk or passes it through processing. In a monitoring path, the signal crosses both an input buffer and an output buffer, so their delays add up.
The driver model determines how directly an application reaches these buffers. ASIO on Windows and Core Audio on macOS give audio software low-overhead access with small, predictable buffers, while general-purpose system mixers add their own intermediate buffering to combine sounds from many applications, which raises latency considerably.
Buffer size, sample rate and latency
Buffer size is normally chosen as a power of two between 32 and 2,048 samples. The table shows the duration of a single buffer at two common sample rates; the actual round-trip latency is higher, as explained below.
| Buffer size | Duration at 48 kHz | Duration at 96 kHz | Typical use |
|---|---|---|---|
| 32 samples | About 0.7 ms | About 0.3 ms | Ultra-low-latency monitoring on fast systems |
| 64 samples | About 1.3 ms | About 0.7 ms | Tracking vocals and instruments |
| 128 samples | About 2.7 ms | About 1.3 ms | Common default for recording |
| 256 samples | About 5.3 ms | About 2.7 ms | Light mixing, virtual instruments |
| 1,024 samples | About 21.3 ms | About 10.7 ms | Mixing large sessions |
| 2,048 samples | About 42.7 ms | About 21.3 ms | Mastering, offline-like workloads |
Round-trip latency, from input jack to output jack, includes the input and output buffers plus converter delays, driver safety buffers and sometimes USB or Thunderbolt transport buffers. A setting of 64 samples at 48 kHz therefore often results in a measured round trip of roughly 3-6 ms, depending on the interface and driver quality.
Doubling the sample rate halves the duration of each buffer but doubles the processing load, because twice as many samples must be computed per second. A higher rate therefore lowers latency only when the computer has enough headroom to handle it.
Audio buffer compared with related timing concepts
Several terms describe delay in a digital audio system, and they are often used interchangeably even though they measure different things.
| Term | What it measures | Controlled by |
|---|---|---|
| Buffer size | Samples processed per callback | Driver or application setting |
| Round-trip latency | Total delay from input to output | Buffers, converters and transport |
| Plug-in latency | Delay added by look-ahead processing | Plug-in design, compensated by the host |
| Jitter buffer | Delay used to smooth network arrival times | Streaming and VoIP software |
| Sample clock jitter | Timing variation of individual samples | Converter clock quality, not buffering |
Delay compensation in a digital audio workstation aligns tracks that pass through plug-ins with look-ahead, such as linear-phase equalizers or look-ahead limiters. It keeps tracks in time with each other but adds to the total monitoring latency, which is why such plug-ins are best avoided while recording.
Choosing a buffer size
The practical rule is to use the smallest buffer that remains stable for the current task and to change it as the task changes. Recording and mixing have opposite priorities.
| Task | Suggested buffer at 48 kHz | Priority |
|---|---|---|
| Tracking with software monitoring | 64-128 samples | Latency low enough for performers |
| Playing virtual instruments live | 64-256 samples | Responsive feel on keys and drums |
| Mixing with many plug-ins | 512-2,048 samples | Stability and processing headroom |
| Live sound or broadcast processing | Smallest stable setting | Predictable, constant delay |
Performers notice monitoring delay differently. Many vocalists find total delays above about 10 ms distracting, because they hear their own voice through bone conduction with no delay, while some instrumentalists tolerate more. When low buffers are impossible, direct hardware monitoring on the interface bypasses the computer entirely.
Dropouts, crackles and their causes
Audible clicks almost always mean that a deadline was missed, not that the buffer is broken. The cause may be heavy processing, but it is frequently a system process that blocks the audio thread for a few milliseconds.
- Power management that lowers processor clock speeds during light load can delay audio callbacks.
- Network, graphics or storage drivers with long interrupt handling create latency spikes that small buffers cannot absorb.
- A single plug-in with a heavy, unpredictable workload can exceed the deadline even when average processor load appears modest.
- Mismatched sample rates between the application and the interface force resampling and may cause periodic glitches.
Raising the buffer size is the quickest remedy, but a well-tuned system can run much smaller buffers reliably than an untuned one with the same processor.
Understanding it simply
An audio buffer is a small waiting area for sound inside a computer. The computer prepares sound in small batches. The audio device plays those batches at a perfectly steady pace.
A bigger batch gives the computer more time to keep up, but the sound comes out a little later. A smaller batch makes the sound feel instant. However, the computer may miss a batch, and then you hear clicks or crackles.
Applied in practice
A home studio musician records vocals into a session that already contains forty tracks and many effects. At a 1,024-sample buffer the mix plays smoothly, but the singer hears a noticeable delay of more than 40 ms in the headphones and cannot sing in time.
For the recording pass, the musician lowers the buffer to 128 samples at 48 kHz and temporarily disables a look-ahead limiter on the master bus. The delay drops to a few milliseconds and the take goes well. For mixing afterward, the buffer returns to 1,024 samples, which keeps playback free of dropouts.