17.01.2013 Views

musicdsp.org source code archive - WSInf

musicdsp.org source code archive - WSInf

musicdsp.org source code archive - WSInf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16-Point Fast Integer Sinc Interpolator. (click this to go back to the index)<br />

References : Posted by mumart[at]gmail[dot]com<br />

Notes :<br />

This is designed for fast upsampling with good quality using only a 32-bit accumulator. Sound quality is very good. Conceptually it resamples the input<br />

signal 32768x and performs nearest-neighbour to get the requested sample rate. As a result downsampling will result in aliasing.<br />

The provided Sinc table is Blackman-Harris windowed with a slight lowpass. The table entries are 16-bit and are 16x linear-oversampled. It should be<br />

pretty easy to figure out how to make your own table for it.<br />

Code provided is in Java. Converting to C/MMX etc. should be pretty trivial.<br />

Remember the interpolator requires a number of samples before and after the sample to be interpolated, so you can't resample the whole of a passed<br />

input buffer in one go.<br />

Have fun,<br />

Martin<br />

Code :<br />

public class SincResampler {<br />

private final int FP_SHIFT = 15;<br />

private final int FP_ONE = 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!