The officially official Devuan Forum!

You are not logged in.

#1 2024-05-06 16:12:05

igorzwx
Member
Registered: 2024-05-06
Posts: 3  

Pulse+Alsa: Is it really LINEAR interpolation?

Arch Wiki claims that the default ALSA resampler  is not a resampler at all, but just a sort of "linear interpolation":

https://wiki.archlinux.org/title/Advanc … resampling
"When software mixing is enabled, ALSA is forced to resample everything to the same frequency (48 kHz by default when supported). By default, it will try to use the speexrate converter to do so, and fallback to low-quality linear interpolation if it is not available"
https://git.alsa-project.org/?p=alsa-li … HEAD#l1278

It is difficult to believe, but it might be true.

It was enough to replace the default ALSA resampler with fftrate, and sound quality with Firefox, PipeWire, pulse libs, and ALSA was essentially improved.
Although, of course, Firefox → apulse → ALSA (with fftrate plugin) produced much better result.
Notice that PipeWire was not removed.

apulse
https://github.com/i-rinat/apulse
fftrate
https://github.com/PetrovSE/fftrate

Linear interpolation
https://en.wikipedia.org/wiki/Linear_interpolation

Linear interpolation

Linear interpolation on a data set (red points) consists of pieces of linear interpolants (blue lines).

It may sound extremely good.

Last edited by igorzwx (2024-05-14 13:38:54)

Offline

Board footer