From Audacity Wiki
Jump to: navigation, search
The SoX Resampler library libsoxr performs fast, high-quality one-dimensional sample rate conversion. Audacity 2.0.3 added libsoxr support and made it the default resampling library, while allowing libresample or libsamplerate to be enabled instead at compile time as sole resampling library. From Audacity 2.1.1 onwards, only libsoxr is used.
  • As was the case with libresample and libsamplerate, libsoxr supports both constant-rate and variable-rate resampling, though variable-rate is 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 in Quality Preferences for constant-rate resampling. 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.

Audacity 2.0.3's "Best Quality" sample rate conversion can be compared with SoX "Very high" and numerous other audio applications in the graphs at at Note that in the "passband" and "transition" graphs, SoX's "steep filter" was used, which option is not available in libsoxr in Audacity. This probably accounts for those two SoX graphs being closer to the "ideal" filter.

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/
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