[pulseaudio-discuss] [PATCH 0/4] Add support for libsoxr resampler

Andrey Semashev andrey.semashev at gmail.com
Fri Nov 14 00:37:07 PST 2014


On Friday 14 November 2014 08:26:18 David Henningsson wrote:
> On 2014-11-13 23:49, Andrey Semashev wrote:
> > 
> > I do not have an explanation for such diverse range of the delay value,
> > and
> > its dependency on the frame size. It doesn't look like the filter is
> > "learning" from the input in some way since the delay doesn't depend on
> > the
> > content. Perhaps there is some extensive buffering in the implementation.
> 
> Well, the delay must be constant given the parameters. If the delay was
> varying during playback, that would probably cause very interesting
> sound effects, such as music being slightly out of tempo or so...

I've been using soxr-vhq with PA 4.0 on my working machine for about a month 
now, and never heard any sound artefacts.

> What does vary during playback, however, is how big chunks we pass into
> the resampler in every go. Which begs the question if it is the first
> chunk that determines the delay, or...?

So PA uses variable frame size? I can try to modify the test for that. Are 
there any reasonable limits of the frame size?

> > For now the bottom line is that the exact delay of the resampler is
> > difficult to predict, although it usually does not exceed 20 ms, except
> > some rare cases and -vhq. When delay is critical it is better to use
> > another resampler, like speex-5, for instance, which consistently stays
> > below 1 ms across the board. But I think, such cases are quite
> > specialized, and soxr is still very well applicable in general use.
> 
> Well, what is "quite specialized" and "general use"? If you use your
> computer primarily for gaming and VOIP, then that's what you consider
> "general use", and perhaps "listening to music so carefully that you
> hear the difference between different resamplers" is what you consider
> "quite specialized"...
> 
> So if it was up to me, I'd say let's keep speex-float-1 as the default,
> as it seems to give the best balance between quality, CPU power, and low
> latency.
>
> With my upstream hat on, I don't mind adding soxr as an option, and with
> my distro hat on, I'm always worried about adding new dependencies...

I'm not changing the default with these patches, soxr is added as an option. 
If not the delay, it would be a very good candidate for being the default, 
though.

As a side note, I think speex-float-1 is a rather poor default as well because 
of its quality. Anyone who cares about the sound he gets will likely change it 
to something like speex-float-3 or 5 anyway. IMHO.



More information about the pulseaudio-discuss mailing list