Commit Graph

5 Commits

Author SHA1 Message Date
Geoffrey McRae
8cb6a6873e [client] audio: recover physical underrun debt
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
A stable clock model can request a negative recovery slew while the
unbounded ring is physically underrun. This leaves the reader ahead of
the writer indefinitely and outputs silence until playback is restarted.

Floor active recovery at the physical low-water requirement. Rebase the
device-clock phase by any extra refill so modeled latency remains at the
target without restarting the underrun correction cycle.

Add a deterministic regression for negative physical debt opposing the
stable clock model.
2026-08-22 19:33:27 +10:00
Geoffrey McRae
ebf764ae25 [client] audio: reset playback cleanly on resume
Count one underrun per starvation episode and end the sync diagnostics
epoch when a logical source stops.

Resume a compatible backend synchronously so data after a same-wire
restart is accepted immediately. Rebase the first post-idle device tick
without passing a long gap through the short-step clock filter.

Cancel in-flight backlog trims before fresh audio can be queued.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
d8e7966087 [client] audio: fix underrun clock recovery
Recover stable local playback in the device clock domain and restart
rate control from the measured feed-forward clock ratio.

Ignore catch-up packet sizing until the normal source cadence returns.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
5b106015de [client] audio: ignore jitter after underruns
Do not learn late delivery from packets that already caused an
underrun and media-clock rebase. Preserve learned jitter only across
continuous playback.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
8bf7c5b49e [client] audio: test streams and microphone consent 2026-08-12 05:05:26 +10:00