Add configurable incoming audio jitter buffer

This commit is contained in:
Brandon McGinty (chatgpt) authored and Brandon McGinty committed 2026-08-13 17:54:30 -04:00
1 parent d338925da6
commit c0ef036934
8 files changed
+94 -16

No files matched your search

+15
View File
@@ -154,6 +154,21 @@ barnard --audio-interval 20
Supported values are `10`, `20`, `40`, and `60` milliseconds. Try `20` ms
first; use `40` ms only if the connection remains unreliable.
## Incoming Audio Jitter Buffer
Barnard holds 40 ms of audio separately for each speaker before starting
playback. This prevents brief delayed UDP packets from draining OpenAL's audio
queue, which otherwise produces clicks or pops. To adjust this tradeoff between
resilience and added incoming latency:
```sh
barnard --jitter-buffer 60
```
Supported values are `0`, `20`, `40` (default), and `60` milliseconds. Try
`60` ms for a lossy or jittery connection. Use `0` only when minimizing latency
is more important than avoiding playback underruns.
## Audio Devices
You can set the default input and output devices in the config file as well.