[linux-audio-dev] Re: Looking for fast integer resampling code

Olivier Guilyardi ml at xung.org
Mon Jun 13 09:54:54 UTC 2005


Hi Erik,

Erik de Castro Lopo wrote:
> Kjetil Svalastog Matheussen wrote:
> 
> 
>>I recently did a lot of benchmarking between libsamplerate and mus_src
>>in clm/sndlib. My result was quite interesting, the fastest mus_src sinc
>>resampler where a lot faster than the fastest libsamplerate resampler.
> 
> 
> I think most people would agree that speed is not the most important
> aspect when measuring the quality of a sample rate converter.

I believe libsamplerate, as a general purpose sample rate conversion library, 
should be able to run very fast if needed. After including your library into 
Jackbeat (http://www.xung.org/jackbeat) I was pretty sad to see 40% of my 700Mhz 
Duron load dedicated to processing only six tracks with libsamplerate's 
SRC_LINEAR converter.

Then, I coded a trivial sample rate conversion routine by myself :
- it sounds good, I can't hear any difference with the SRC_LINEAR converter
- my cpu load droped to 7%

I did not read the SRC_LINEAR source, but if we understand each other on what 
linear conversion is, then my trivial converter does the same thing in 10 lines 
and more than 5 times faster. If you want to take a look at it, it's located 
between lines 274 and 283 in src/sequence.c, in Jackbeat 0.5.1

Maybe there's a design problem in libsamplerate ? Why is the SRC_LINEAR 
converter so slow ?

PS: I did not give up support for libsamplerate. The GUI allows the user to 
choose between your SRC_SINC_FASTEST converter, and my homemade converter.

--
   og



More information about the Linux-audio-dev mailing list