[LAD] precision resampling to correct clock differences - no luck with libsamplerate and zita-resampler...

Erik de Castro Lopo mle+la at mega-nerd.com
Sat May 22 10:38:06 UTC 2010


Jörn Nettingsmeier wrote:

> unfortunately, both zita-resampler and libsamplerate seem to represent
> the sample rate ratio internally as a fraction of two integers,

I haven't looked at the code for zita-resampler but for libsamplerate,
what you said above, is not correct.

Sepcifically :

  a) The API has an src_ratio field which is of type double floating
     point. Thats how you chose your resampling ratio.

  b) Internally, the time distance between samples is also calcutated
     in double floating point.

The only place integers are used for time offsets is in the calculation
of the indices into the filter table and the interpolation between two
adjacent values in the table.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



More information about the Linux-audio-dev mailing list