# Low-latency sound

> Set the sound delay for recording, live monitoring and music apps in Settings > Sound > Pro Audio, down to 64 samples (1.3 ms), and see dropouts.

Source: https://wolos.org/manual/audio-latency

## What it is

*Latency* is the delay between a sound happening and you hearing it through the computer. While you watch a film it does not matter. While you sing into a microphone and listen to yourself in headphones, or play a keyboard into a music app, a delay of a few hundredths of a second already sounds like an echo. The delay comes from the **buffer**: the small batch of sound the computer prepares before it plays it. A small buffer means less delay, but the computer must keep up; if it does not, you hear a click (a *dropout*). Settings > Sound > **Pro Audio** sets that buffer for the whole computer.

## Why

There is no buffer that is right for everything. Monitoring through a music app wants the smallest; a stream wants a middle size; video and Bluetooth want a large one, and a laptop on battery saves power with a large one. So WolOS leaves the buffer on **Automatic** for everyday use, lets music apps and games ask for small buffers on their own, and gives you one place to fix the size for a session. A web browser cannot drag the whole computer down to a tiny buffer: ordinary apps have a floor, while music apps and games may go to the smallest.

## How

1. **Check the sound first.** Open Terminal (**Super+Space**, type `te`, Return) and run:

   ```sh
   wol audio doctor
   ```

   You see each check (the sound services, inputs above their normal level, forced buffers, dropouts, the streaming pieces), each with the exact fix.
2. **Open Settings > Sound.** Press **Super+,** and choose **Sound**, or type "buffer" in the Settings search field.
   You see the outputs and inputs at the top. **Pro Audio** is further down the page.

   ![Settings > Sound: Output volume and Mute, the Output list (AirPods Pro with AAC, MacBook Speakers, HDMI Display), Balance, Allow louder, and the start of the Input list.](/img/manual/settings-sound-wide.png)
3. **Choose a Buffer size** in Pro Audio for the job:

   | Job | Buffer size |
   |---|---|
   | Live monitoring through a music app (Ardour, for example) | 64 samples (1.3 ms) |
   | Streaming and recording a voice | 256 samples |
   | Everything else, and Bluetooth | Automatic |

   The change applies at once, survives a restart, and stays until you change it back.
4. **Leave Sample rate on Automatic** unless a session needs one rate throughout. Automatic follows 44.1, 88.2 and 96 kHz material instead of converting it.
5. **Watch Dropouts.** The Pro Audio card counts them: "None", or how many since sound started.
   If the number grows while you record, choose the next larger buffer.

### Music apps and audio interfaces

Music apps such as Ardour see WolOS's sound server as their own audio engine, with the buffer you chose, so there is nothing else to start. The Creative module adds Ardour and the piece they need; see [Creative apps in one step](/manual/creative-module). A USB audio interface keeps its own knobs for microphone gain. To give a music app every channel of an interface raw, switch the card's profile to *Pro Audio* in a terminal: `pactl list short cards` names the card, then `pactl set-card-profile <card> pro-audio`.

## A worked example

Alice plays a keyboard into Ardour and hears her notes a hair too late. She opens Settings > Sound, finds Pro Audio and chooses 64 samples. The delay is gone, but after a minute she hears small clicks and the Dropouts count starts to grow, so she chooses 128 samples instead. Clicks stop, and the notes still feel instant. When the session is over she sets the buffer back to Automatic.

## If something goes wrong

| What you see | What to do |
|---|---|
| Clicks or crackles while recording | The buffer is too small for this computer right now. Choose the next larger size, close other apps, or plug the laptop in. Try another USB port or a powered hub for an interface. |
| Your voice comes back late in the headphones | The buffer is large. Choose 64 or 128 samples in Pro Audio. |
| The music app says it cannot start its audio engine | Run `wol audio doctor` and follow the line marked as a problem. |
| In a virtual machine the buffer stays large | That is on purpose: virtual sound cards cannot keep small buffers, so WolOS raises them. Measure on real hardware. |
| You want everything back as it was | `wol audio reset` shows what a reset would do; `wol audio reset --yes` removes the Pro Audio choice, forgets stored volumes and restarts sound. Apps reconnect by themselves. |

## Related

[Sound for creators](/reference/creators-audio) · [Sound](/manual/sound) · [Creative apps in one step](/manual/creative-module) · [Settings](/manual/settings)
