Add adaptive packet loss handling
Build and test / test (macos-latest) (push) Canceled after 0s
Build and test / test (ubuntu-24.04) (push) Canceled after 0s
Build and test / test (windows-latest) (push) Canceled after 0s
Build and test / apple-client (push) Canceled after 0s

This commit is contained in:
2026-09-22 16:54:49 +02:00
parent 7c4708c3de
commit 7b0c003ad4
35 changed files with 518 additions and 60 deletions
+11 -2
View File
@@ -228,8 +228,17 @@ moves members to Lobby (even if full), clearing their streams. Edits stop existi
so clients must negotiate the updated audio configuration. Channel names/topics/passwords
are limited to 128/4096/1024 UTF-8 bytes. Audio requires Opus, 48 kHz, mono/stereo,
500512000 bps, integral 5/10/20/40/60 ms frames and valid application/loss/complexity.
Database v3 persists DRED with the rest of the channel audio configuration. Opening a v1 or v2
database adds the DRED column with a disabled default before accepting channel updates.
Database v4 persists DRED and `AudioConfig.packet_loss_mode` with the rest of the channel audio
configuration. Opening older databases adds missing columns with disabled/manual defaults. The
mode's zero value is manual for wire and database compatibility. Automatic Fast/Balanced/Stable
modes use 3/10/30-second sender-uplink
windows respectively. The server derives loss only from authenticated media counters, requires at
least 20 expected packets, caps the applied Opus hint at 30%, and sends changed values to capable
clients with `PacketLossUpdate`. The managed audio worker applies the mutable encoder control;
device callbacks remain free of networking, allocation, and synchronization. The stored manual
percentage is retained as the bootstrap value while an automatic window fills.
Support is advertised as `adaptive-packet-loss` in both hello feature lists. Older senders keep
using the bootstrap value, and edits from older administrators preserve an existing automatic mode.
Session permissions gate kick/ban/move/mute and account operations. Only administrators
can grant permissions; account-administration permission cannot grant administrator status.