mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: improve latency setup a little
Reorganize the latency setup in one place, return a desired device latency for use as quantum. PulseAudio assigns half of the (tlength - minreq) latency to the sink but we can't do that because our sinks have a max-quantum of latency. Fix this by clamping our calculated sink latency to the quantum PulseAudio subtracts the sink latency from the tlength in adjust latency mode, so we need to do the same. This makes PULSE_LATENCY_MSEC values bahave more like pulseaudio. See #1769
This commit is contained in:
parent
86ca0f8466
commit
b96f15d2fe
2 changed files with 54 additions and 38 deletions
|
|
@ -51,6 +51,7 @@ struct defs {
|
|||
struct spa_fraction min_quantum;
|
||||
struct sample_spec sample_spec;
|
||||
struct channel_map channel_map;
|
||||
uint32_t max_quantum;
|
||||
};
|
||||
|
||||
struct stats {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue