2007/11/27, cyanh256@xxxxxxxxxxxx <cyanh256@xxxxxxxxxxxx>: > The other thing I noticed while skimming through was that > there doesn't seem to be any kind of encoder state > preservation between calls to the resampling function. > When working with small buffers (typical of soundcard > buffers in BeOS -- I'm using a buffer size of 64 frames), > there's the danger of inaccuracies appearing at the initial > (or last) samples, which could become audible as a tone > at these buffer sizes. Providing some way for the function > to know what samples occured at the end of the previous > buffer (such as passing a state struct into the resampling > function) generally clears it up. What about "interpolating remaining one sample behind the input buffer" (so that you cannot have to interpolate values beyond the innput buffer) and passing the last 3 or 4 samples of the previous input buffer through a struct, as you suggested, so that the values you now have to inteprolate before the input buffer are well defined? Stefano