How do I choose a buffer size? And how does computer audio (really) work?

Although Desktop computers are blindingly fast inside, they are optimized to interface with the world at “human speed”… a user sends dozens of keyboard commands every second, at best; and the screen is updated perhaps 30-50 times per second. But audio events ( or more accurately, “samples” ) typically occur 44,100 times per second, or more! Computers are not intended to be ‘interrupted’ by the outside world this often; and if you did, it would severely compromise the amount of work that the computer can attend to.

When a computer soundcard ( whether internal, USB, Thunderbolt, or something else ) gathers audio data from the Analog-to-Digital converters, it can’t “wake up” the computer CPU 44,100 times per second. So it has to gather (or: “buffer”) the audio for a while, and then pass this larger buffer to the computer for processing. This buffer size can be changed by the user to balance the system’s stability and power, versus latency and responsiveness.

If you choose too low a buffer size, you will likely encounter ‘clicks’ when your system gets busy. If you choose too high a buffersize, then you might hear a delay through the system, or notice that the computer is not very responsive to you.

This video by Richard Ames provides an overview of your computer’s audio system, and why the buffer size is such an important factor in your computer’s performance.

Latency

“Latency” is the amount of time it takes for digital audio to pass from the computer’s input to output. The buffer size has a direct effect on latency: Larger buffer sizes will incur a longer latency. In many cases, latency doesn’t matter much. If you just need to play your tracks for mixing, then a fairly large buffersize will provide the best system stability.

Due to the nature of computers and digital audio, there will always be some latency in a DAW. Even if the soundcard operated with no buffer ( a buffersize of “1” ) then the process of converting Analog to Digital, and then back to Analog, will incur about 2-3 milliseconds.

If audio arrives at the output later than desired then it is considered to have high latency. If the latency is minimal, we may not be able to perceive it. Low latency is desirable for recording, tracking, overdubbing, etc. But there is a lot of debate about how much latency is too much. And it varies depending on the situation and the performers.

Buffer

A buffer is an area in the sound-card’s memory that is set aside to temporarily store digital audio. By temporarily storing digital audio we can prevent any interruption in the flow of sound. Interruptions will be heard as clicks and pops. We can set the size of the buffer to achieve a specific delay, usually measured in milliseconds. The memory stores samples of audio, and the more samples that are “buffered”, the more latency will be exhibited. Hence, the size of the buffer also determines the latency. Setting the buffer too small can cause buffer underruns with audible pops and clicks. Setting the buffer too large might cause a noticeable delay in the sound or operation.

In digital audio, buffer sizes are almost always defined in blocks of powers-of-2. Your soundcard driver will define the available buffer sizes for you to choose. The most commonly available values are: 64, 128, 256, 512, 1024, and 2048.

Generally speaking, a buffer of 1024 is a good balance of stability and responsiveness when you are mixing. That’s the default value that we choose for Mixbus. But if you are recording yourself and you want to play through the computer, you might choose a smaller buffersize. Just be aware that you might cause pops & clicks in your recording if you exceed the capabilities of your system.

Sample Rate Vs. Buffer size

If you choose to run at 96 or another high rate, you’ll notice 2 things:

  1. Your soundcard’s buffer now “fills up” faster, and it wakes the computer more often.
  2. Your computer is now processing twice as many samples, and therefore working harder.

For those 2 reasons, you will likely need to increase the buffersize when you use higher sample rates, to maintain the same performance.

If you want to absolutely minimize the latency through Mixbus, you could choose the lowest possible latency and the highest possible rate. This will minimize the latency from input to output. But it will likely exceed your computer’s capabilities very quickly, and you might get clicks&pops in your recording.

Buffer size while mixing or editing

While mixing or editing, a large buffer will prevent pops and clicks at the expense of a slightly less responsive system. This lack of responsiveness may be evident when pressing the play button and a slight delay occurs before audio can be heard. Many times this delay is so small you may barely notice it. So while mixing or editing, a larger buffer is advisable. A buffersize of 1024 samples is typical.

Buffer size while recording

If monitoring through a DAW and an artist needs to listen to themselves while recording ( such as a vocalist listening to a headphone mix ) then low latency audio will be required. Adjust the buffer size to achieve a latency of 10 ms or so. A value of 128 samples is typical. Furthermore it is important to avoid using plugins that cause additional latency.

Our friends over at Sound on Sound have some great information on this topic http://www.soundonsound.com/sos/jan05/articles/pcmusician.htm

Hardware Vs. Software Monitoring

If you plan to record with Mixbus, one of the most important options is the Monitoring mode.

If you choose “Mixbus does monitoring” then:

  1. Mixbus can control which channels you are hearing (subject to the Monitoring rules … see section “Monitoring” ). So, for example, Mixbus will only “monitor” the inputs that are currently record-armed.
  2. The inputs will automatically be mixed into the master output of Mixbus, so you can hear them in context with your mix.
  3. You will be able to hear any effects (eq, compression, and/or plug-ins) that are applied to the tracks.
  4. HOWEVER: the signal path through your converters, Mixbus, and plug-ins can add up to a significant latency. The latency can be minimized by using a small buffer size, and avoiding the use of plug-ins with long latency

If you choose “Hardware does monitoring” then:

  1. You will not incur the latency penalty of getting into and out-of the computer. However if your interface or mixer uses digital signal processing, there may still be some latency.
  2. You must use your external I/O controls, and/or mixing console, to build monitor mixes for your talent.
  3. Mixbus cannot control which channels you are hearing. Record-arming a track in Mixbus will not automatically route that track into the monitor mix.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment