[pulseaudio-discuss] [PATCH 2/4] Enabled libsoxr resampler backend.

Andrey Semashev andrey.semashev at gmail.com
Wed Jan 7 13:10:22 PST 2015


On Wed, Jan 7, 2015 at 7:39 PM, Peter Meerwald <pmeerw at pmeerw.net> wrote:
>> > >
>> > >           case PA_RESAMPLER_PEAKS:
>> > > -            if (a == PA_SAMPLE_S16NE || b == PA_SAMPLE_S16NE)
>> > > -                work_format = PA_SAMPLE_S16NE;
>> >
>> > Were the rows above removed on purpose? I suppose the behaviour should
>> > be different between SOXR and PEAKS here.
>>
>> Yes, I did that intentionally. The point is that audio processing should be
>> done with max precision of the input and output signals. I don't see why PEAKS
>> should be special in this regard - it does support both int16 and float
>> samples.
>
> in any case, such change should be in a separate, independent patch
>
> peaks is a bit special as it just computes the maximum absolute sample
> magnitude over a number of samples; switching to float does not improve
> quality but causes (potentially expensive) floating point comparisions
>
> I think the current special case code for peaks, i.e.
> if (a == PA_SAMPLE_S16NE || b == PA_SAMPLE_S16NE)
>    work_format = PA_SAMPLE_S16NE;
> makes sense

Ok, I'll add this shortcut for PEAKS.


More information about the pulseaudio-discuss mailing list