[LAD] Re: Help with resampling algorithm

Fons Adriaensen <[email protected]>
Newsgroups gmane.linux.audio.devel
Message-ID <[email protected]>
On Tue, Apr 23, 2024 at 10:47:43AM +0100, Marco Castorina wrote:
 
> > for each output sample you use a new filter from the set of 128 by
> > incrementing the index by a fixed value. This may not be an integer,
> > so you need to round.
 
> This is what I am struggling with: how do I determine by how much to
> advance?

It depends on the inverse of the resampling ratio, R = Fin / Fout.

Note that all filters have the same frequency response, they just
provide a different delay in the range of 0 to 1 input samples.

Let P be the position in the input stream where the center of the
filter has to be.

For each new output sample P increments by R.

The integer part of P determines what should be first input
sample. The fractional part determines which filter to use. 

Ciao,

-- 
FA

_______________________________________________
Linux-audio-dev mailing list -- linux-audio-dev-cunTk1MwBs/[email protected]
To unsubscribe send an email to linux-audio-dev-leave-cunTk1MwBs/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.