gnif / LookingGlass

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.
GNU General Public License v2.0
4.66k stars 257 forks source link

[client] audio: reduce hardcoded minimum latency #967

Closed spencercw closed 2 years ago

spencercw commented 2 years ago

The current minimum target latency is partially based upon the default qemu behaviour whereby audio packets are delivered in a sawtooth pattern, with packet timestamps drifting between 5ms above and below the measured clock. This 5ms error is baked into the minimum target latency to avoid underrunning.

This sawtooth pattern can be reduced by specifying a lower timer period in the qemu configuration, so remove it from the hardcoded minimum latency and add it to the default configurable buffer latency instead. This allows users that have configured their VM appropriately to reduce the overall latency.