mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[client] audio: tune target latency
The target latency is now based upon the device maximum period size (which may be configured by setting the `PIPEWIRE_LATENCY` environment variable if using PipeWire), with some allowance for timing jitter from Spice and the audio device. PipeWire can change the period size dynamically at any time which must be taken into account when selecting the target latency to avoid underruns when the period size is increased. This is explained in detail within the commit body.
This commit is contained in:

committed by
Geoffrey McRae

parent
ca29fe80a6
commit
e1e60fdaa6
@@ -47,7 +47,8 @@ struct LG_AudioDevOps
|
||||
/* setup the stream for playback but don't start it yet
|
||||
* Note: the pull function returns f32 samples
|
||||
*/
|
||||
void (*setup)(int channels, int sampleRate, LG_AudioPullFn pullFn);
|
||||
void (*setup)(int channels, int sampleRate, int * maxPeriodFrames,
|
||||
LG_AudioPullFn pullFn);
|
||||
|
||||
/* called when there is data available to start playback
|
||||
* return true if playback should start */
|
||||
|
Reference in New Issue
Block a user