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@lists.linuxaudio.org To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org