[pulseaudio-discuss] Virtual audio cable - high cpu usage

Alexander E. Patrakov patrakov at gmail.com
Wed Feb 3 23:19:37 UTC 2021

чт, 4 февр. 2021 г. в 03:10, Renaud GHIA <rghia at tixeo.com>:

> Thank you for the tip.
> Now I am sure that resampling does not apply (see below).
> But unfortunately pulseaudio always consumes 30% of one CPU core!

The reason is that you are using module-loopback. Due to a potential
difference between the clocks on the null sink and on the real sound card
(even though both report 44100 Hz), it always has to resample in order to
correct for the clock skew. If you don't understand, here is an analogy:
you have two mechanical watches. Even though both claim that their hour
hand makes one full circle every 12 hours, in fact, if left unattended,
they will diverge over time. There is no way to avoid that, except by
moving to Jack or PipeWire which simply don't introduce a null sink with an
independent clock.

If you decide to stay on PulseAudio, you can tweak the resampling method.
The default, speex-float-1, is light on the CPU resources and should
produce no distortions detectable by human ear on typical speech and music.
It does produce easily detectable distortions on specifically crafted
signals. If you want to make sure that the resampler is transparent no
matter what is thrown at it, use speex-float-5. There is no point in going
higher than that.

Alexander E. Patrakov
CV: http://u.pc.cd/wT8otalK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20210204/f147f0bc/attachment.htm>

More information about the pulseaudio-discuss mailing list