srconv

Name

srconv --  Converts the sample rate of an audio file.

Description

Converts the sample rate of an audio file at sample rate Rin to a sample rate of Rout. Optionally the ratio (Rin / Rout) may be linearly time-varying according to a set of (time, ratio) pairs in an auxiliary file.

Syntax

srconv [flags] infile

Initialization

Flags:

This program performs arbitrary sample-rate conversion with high fidelity. The method is to step through the input at the desired sampling increment, and to compute the output points as appropriately weighted averages of the surrounding input points. There are two cases to consider:

  1. sample rates are in a small-integer ratio - weights are obtained from table.

  2. sample rates are in a large-integer ratio - weights are linearly interpolated from table.

Calculate increment: if decimating, then window is impulse response of low-pass filter with cutoff frequency at half of output sample rate; if interpolating, then window is impulse response of lowpass filter with cutoff frequency at half of input sample rate.

Credits

Author: Mark Dolson

August 26, 1989

Author: John ffitch

December 30, 2000