> Unfortunately, the real problem with the alsa resamplers is not the > quality of the algorithm. If it was just that, we would have fixed it > ages ago. > The real problem is related how the "period" model that ALSA currently > uses functions. > We need to implement new timers at the application rate, instead of > trying to use the hardware rate. This would then require some extra > buffer management. Currently, none of the ALSA developers have had > enough time to implement the changes required. So in the nearly 10 years of ALSA existing, the problem has been known but nobody managed fix it (I realise it's hard)? > Here is a small example of what the problem really is: > Hardware does 48000. We have the hardware period set at 1024, with 2 > periods per buffer. > The software application wishes to do 44100. So, the software > application tries to set a period of 1024, with 2 periods per buffer. > But, due to the restrictions of the current periods model, one can only > do 44100/48000 * 1024 = 940.8 > Now, we cannot use fractions of a period, so we return 940 as the max > period size to the application. This results of a real application rate > 44062.5. > What we really need is for the application to get it's 44100, 1024 > period size and 2 periods, and alsa-lib to provide the required > abstraction to deliver 48000, 1024 period size and 2 periods to the > hardware. > > So, as you can see, it is not an easy quick fix. So until ALSA is fixed to do things properly, would it be possible to at least pass the information so that the resampler can actually use a ratio of 44062.5/48000 instead of attempting to do 44100/48000 and then dropping samples? Considering most soundcards have shitty clocks anyway, the problem may not be too bad (unless using really small period sizes of course). Jean-Marc ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel