[LAD] precision resampling to correct clock differences - no luck with libsamplerate and zita-resampler...
fons at kokkinizita.net
fons at kokkinizita.net
Sat May 22 20:19:53 UTC 2010
On Sat, May 22, 2010 at 11:49:55AM +0200, Jörn Nettingsmeier wrote:
> is there a hard technical reason for the behaviour of the resamplers?
> would it make sense for this bear of very little brain to dig into the
> code and try to convince them to perform resampling at ratios with full
> double precision, or is such an undertaking bound to fail?
AFAIK, the secret rabbit will do any double rate.
For zita-resampler there is a technical reason: I want to
avoid having to interpolate filter coefficients, so all of
them are precomputed. The number of coefficient sets required
in that case is b, where b/a = fs_out/fs_in reduced to the
smallest possible integer ratio. For that reason the value
of b is limited to 1000. This covers all 'common' cases.
In fact it covers 'almost all' ratios with a relative
precision of around 1e-6. For example 355/113 = pi with
a relative error smaller than 1e-7.
Future version of zita-resampler may implement arbitrary
resample ratios, either by interpolating, or more likely
by finding two such small approximations and dithering
between them, or by using a special algorithm for near-
integer ratios.
Ciao,
--
FA
O tu, che porte, correndo si ?
E guerra e morte !
More information about the Linux-audio-dev
mailing list