[pulseaudio-discuss] [PATCH] loopback: Always use the trivial resampler.

pl bossart bossart.nospam at gmail.com
Thu Mar 24 06:31:12 PDT 2011


On Thu, Mar 24, 2011 at 8:16 AM, Tanu Kaskinen <tanu.kaskinen at digia.com> wrote:
> Adjusting the sample rate is done in the IO thread, which can cause
> interruptions in the audio if the adjustment requires heavy computation. The
> trivial resampler is guaranteed to be light on the cpu.
>
> It would be better to adjust the sample rate in some other thread (FWIW,
> module-combine uses the main thread), but this quick hack fixes the immediate
> problem of spending too much time in the IO thread.

I don't think it's the right or only way to solve the problem. If you
are using the loopback and SRC is required, the assumption is that you
don't care too much about latency. If the audio events are spaced
enough, there should be plenty of time to run the resampling. we
should instead adjust the sink/source latencies to reduce the number
of events and not compromize on quality.
This trivial resampler should only be used if for some reason you want
both real-time behavior and low-latency while using an SRC. I fail to
see in what cases you would care? In what practical cases did you
encounter underflows?
-Pierre



More information about the pulseaudio-discuss mailing list