Sample rate conversion (SRC) resamples audio from one rate (e.g., 44.1 kHz) to another (48 kHz). Bad SRC introduces aliasing artifacts (audible buzzing). Good SRC is one of the hardest DSP problems to do well. Three techniques cover most use cases.

Advertisement

Linear interpolation (bad)

Pick the nearest source samples and interpolate linearly. Cheap. Massive aliasing artifacts. Acceptable only for non-audio applications (logging, control signals).

Sinc-based (correct)

Convolve with a windowed sinc function. Mathematically the right answer for bandlimited signals. SoX, libsamplerate, sox-libresample. Cost: ~100x linear. Used in pro audio.

Advertisement

Polyphase + Kaiser window

Decompose the sinc filter into N polyphase sub-filters, one per output phase. Compute only the needed phase. Same quality as sinc, ~10x faster. Standard production technique. Most modern libraries use this.

FFT-based (specific cases)

Convert to frequency domain, manipulate bins, inverse FFT. Fast for ratios that don't have nice factors. Quality competitive with polyphase. Used by some codecs (Opus, AAC) for internal SRC. Less common as a standalone tool.

Quality vs latency

'High quality' SRC implies long filter taps → high latency. Real-time audio (sub-10ms latency) uses shorter filters with mild aliasing. Offline rendering uses 2000+ tap filters for sub-100 dB aliasing. Pick based on whether you can afford latency.

Polyphase sinc with Kaiser window is the production sweet spot. Linear interp is never right for audio.