[linux-audio-dev] fast linear resampling on ARM - suggestions?

Andrew Cannon ajc at gmx.net
Wed Apr 5 23:27:02 UTC 2006


Tobias Scharnberg wrote:
> Hello List,
> I'm trying to find a library or code-snippet in order to do audio
> resampling from 8khz to 44,1khz and from 44,1khz to 8khz. I need to
> resample the data in realtime - resampling a buffer of data, not a
> soundfile. The quality doesn't need to be good so I guess the best
> solution might be linear audio resampling. The device to do the
> resampling on is an ARM CM-X255 running at 400MHz.
> 
> I tried out libsamplerate so far but when I tested it with the
> soundfile conversion test program it needed 3,5 secs to sample from
> 8kHz to 44,1 khz for a 1,7 secs audiofile - which is too slow for me.
> 
> Is there something faster that can do the job?
> 
> Any suggestions are highly welcome

Hi Tobias

I suggest using a Kaiser-window based interpolation algorithm. This is
the best filter method to use for sample rate conversion. You can get
decent results with 8 taps or even fewer. For example you can get a 6dB
bandwidth of about 2.8kHz (at Fs=8kHz) with 50dB alias rejection. (of
course you need more taps for high-quality results)

I implemented an 8 tap SRC on an ARM-9 using integer arithmetic... I
can't remember the exact CPU usage but it was only of the order of 10MHz
or so. I'm not familiar with the CPU you mention - if it hasn't got the
DSP instructions then it will be a bit slower but you seem to have
plenty to spare!

Linear interpolation is no good for audio - you will have about 10%
distortion!

Andrew




More information about the Linux-audio-dev mailing list