Libsoxr

From Audacity Wiki
Jump to: navigation, search
The SoX Resampler library libsoxr performs fast, high-quality one-dimensional sample rate conversion. Audacity started using libsoxr from version 2.0.3 onwards.
  • As of 2.0.3, libsoxr is the default resampling library in releases and when compiling Audacity, instead of the former libresample. Either libresample or libsamplerate can be enabled at compile time as sole resampling library instead of libsoxr. Libsamplerate should not be enabled if the build enables VST plug-in support, due to licensing reasons.
  • All three libraries support both constant-rate and variable-rate resampling (currently only used in Time Tracks). Libsoxr's variable-rate support is of recent implementation so may be subject to further development.

Four SoX Resampler quality levels are available for constant-rate resampling in Audacity; which one to use in different circumstances may be selected in the Preferences/Quality menu. Note that the names assigned to these levels differ from those used by the 'sox' command-line utility; equivalent names are shown in the following table:

Quality level names
Audacity sox 'rate'
Low Quality Quick
Medium Quality Low
High Quality High
Best Quality Very high

See the 'rate' effect in the SoX manual for details (frequency response, etc.) of each of these quality levels.

For variable-rate resampling, libsoxr uses a single, dedicated quality level; this is selected automatically by Audacity when performing a task that requires it.

For comparison purposes, the following table attempts to place in order of increasing quality, current resampling qualities (with libsoxr), and those with resamplers available in previous/other configurations of Audacity:

Resampler libraries quality comparison
Libsoxr Libresample Libsamplerate Filter-order/
Bit-precision
ZOH Interpolator 0/-
Linear Interpolator 1/-
Low Quality 3/-
Fast Sinc Interpolation -/14
High-quality Sinc Interpolation -/15
Medium Quality Fastest Sinc Interpolator -/16
(variable-rate) -/20
High Quality Medium Sinc Interpolator -/20
Best Sinc Interpolator -/24
Best Quality -/28
Personal tools