Hi! On Thu, Mar 30, 2006 at 10:33:58PM +0200, [EMAIL PROTECTED] wrote: > i cant use a 2 times upsampler.... > i want to use an unsynced soundcard with clockdrift as a recording > source. and i really dont want to make any quality compromises. > > i need all features of libsrc (slowly changing samplerate, and resample > factors of 1.00001 or so)
Ok, I thought a bit in this case. You probably can get better quality than the libsrc linear interpolation while still being quite a bit faster than libsrc sinc interpolation. First algorithm: upsample by factor 2 (you can use my code as it is), then use linear interpolation. Why this is better than plain linear interpolation? Because low frequency signals can be better approximated by lines than high frequency signals, and after upsampling by factor 2 your signals will tend to be low frequency signals. Second algorithm: perform factor N upsampling (for instance factor 16 upsampling), then use linear interpolation. The quality should become even better. The performance will not suck as badly as "factor 16 upsampling" sounds, because you only need to compute those sample values that you need to do linear interpolation. As performance estimate, I think the first algorithm should outperform libsrc with a factor between 10 and 30, the second algorithm should outperform libsrc with a factor between 3 and 15 (given that both are implemented in an SSE accelerated way, like I did). As for quality, I'd really like to know what quality can be attained by this approach at what speed. Could it even outperform libsrc on both, quality and performance, under some circumstances? Cu... Stefan -- Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan
