Skip to content

loopback: Add option fast_adjust_threshold_msec

Georg Chini requested to merge gchini/pulseaudio:loopback_force_adjust into master

Fixes #15 (closed) together with !69 (merged). After a suspend/resume cycle of a system, it may be possible that module-loopback accumulates several seconds of audio in the memblockq before the alsa sink becomes active again. Also it may be possible for other reasons that the actual loopback latency is too different from the target latency to be adjusted in a reasonable time by the normal rate controller. This patch adds the option fast_adjust_threshold_msec to module-loopback. If set, the latency will be forcefully adjusted to the target latency by dropping or inserting samples if the actual latency differs more than fast_adjust_threshold_msec from the target latency. Also the calculation of the real adjust time would fail when the system was suspended because that case was not considered. Now the real adjust time calculation is skipped if the time passed between two calls of adjust_rates() appears significantly too long.

Merge request reports