mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-02 05:12:02 +00:00
737614bc691b45b637f962343d9ca33f3bfe24db
Model playback latency from the device period, arrival jitter, source packet phase, and resampler delay. Treat audio:latencyOffset as an explicit addition to this minimum and align the first device pull to the next packet deadline. This starts playback near its steady-state target without unnecessary prefill or startup underruns. Use a 512-frame default period as a practical low-latency baseline. Replace the startup clock hold with a one-sided proportional acquisition controller, then hand off to source/device rate feed-forward and a slow phase loop. Calibrate the logical device timeline at handoff, discard correction that opposes the current error, and slew-limit rate changes. This prevents startup drain, integral wind-up, overshoot, and long convergence while preserving clock-drift compensation. Allow audio backends to expose a real-time resampler and use PipeWire's adaptive resampler when version 1.4 or newer supports it. Retain libsamplerate as the fallback and add audio:resampler to select the implementation. Wait for PipeWire stream setup to complete and propagate rate-control failures cleanly. Track PipeWire input-consumption and output-equivalent clocks separately. The input clock measures ring latency while the output clock drives feed-forward using the ratio that governed each request. This removes delayed self-feedback that made adaptive resampling oscillate between the correction limits. Reduce audio:debug output to useful latency, clock, jitter, and xrun values, and scale the playback graph from the startup estimate. Update the option names and documentation for the new latency model.
Looking Glass
An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.
- Project Website: https://looking-glass.io
- Documentation: https://looking-glass.io/docs
Documentation
❕❕❕ IMPORTANT ❕❕❕
This project contains submodules that must be checked out if building from the git repository! If you are not a developer and just want to compile Looking Glass, please download the source archive from the website instead:
https://looking-glass.io/downloads
Source code for the documentation can be found in the /doc directory.
You may view this locally as HTML by running make html with python3-sphinx
and python3-sphinx-rtd-theme installed.
Languages
C
81.3%
C++
14.9%
CMake
2%
NSIS
0.8%
GLSL
0.6%
Other
0.4%