Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

136.2. libsamplerate-0.2.2

Secret Rabbit Code — audio sample rate converter library

0.2.2-1 · BSD-2-Clause · 0.2 SBU · 1.5 MiB, 25 files · 41_system, 135 of 1047 · ports/core/audio-dsp/libsamplerate

Homepage: https://libsndfile.github.io/libsamplerate/

Why it is in KDOS. The comment above it in script/phases/41_system/packages.d/audio-dsp.txt:

The converter with a published error floor. rubberband takes it rather than its own builtin, which is correct and audibly worse on a long stretch.

libsamplerate, also called Secret Rabbit Code, is the sample-rate converter library from the libsndfile project: three band-limited sinc converters that trade quality against computation, the best of them with a 145 dB signal-to-noise ratio and a passband reaching 96% of the theoretical bandwidth, plus a linear and a zero-order-hold converter for when speed matters more. In KDOS rubberband is built against it rather than its own built-in resampler, and alsa-utils, mpd, ardour and vlc are among the ports that link it.

Depends on: cmake.

Required by (17): alsa-utils, ardour, aubio, audacious-plugins, chocolate-doom, crispy-doom, fldigi, freedv-gui, k3b, kwave, lmms, mlt, mpd, mupen64plus, ngspice, rubberband, vlc.

Sources: libsamplerate-0.2.2.tar.xz (3.2 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install libsamplerate'

build.sh:

mkdir -p build && cd build
cmake .. -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib \
	-DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DLIBSAMPLERATE_EXAMPLES=OFF
make
make DESTDIR=$PKG install

Libraries: libsamplerate.so.

Directories: /usr/lib/cmake/SampleRate, /usr/share/doc/libsamplerate, /usr/share/licenses/libsamplerate.