mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-01-04 11:08:50 -05:00
pulsecore: Add alternative time smoother implementation
This patch adds an alternative time smoother implementation based on the theory found at https://www.freedesktop.org/software/pulseaudio/misc/rate_estimator.odt. The functions were written to replace the current smoother functions nearly on a one-to-one basis, though there are a few differences: - The smoother_2_put() function takes a byte count instead of a sound card time as argument. This was changed because in most places a sample count was converted to a time before passing it to the smoother. - The smoother needs to know sample rate and frame size to convert byte counts to time. - A smoother_2_get_delay() function was added to directly retrieve the stream delay from the smoother. - A hack for USB devices was added which works around an issue in the alsa latency reports for USB devices. The smoother delivers much better precision than the current implementation. For results, see the document referenced above. The new functions are still unused. The following patches will convert all callers of the smoother functions so that they can use both smoother implementations, depending on a configure option. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/55>
This commit is contained in:
parent
851c377d6b
commit
156b572954
4 changed files with 464 additions and 0 deletions
|
|
@ -170,6 +170,7 @@ src/pulsecore/thread-mq.c
|
|||
src/pulsecore/thread-posix.c
|
||||
src/pulsecore/thread-win32.c
|
||||
src/pulsecore/time-smoother.c
|
||||
src/pulsecore/time-smoother_2.c
|
||||
src/pulsecore/tokenizer.c
|
||||
src/pulsecore/x11prop.c
|
||||
src/pulsecore/x11wrap.c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue