On Thu, Jan 21, 2021 at 10:29:19PM -0300, Érico Nogueira wrote: > Hi! > > Commit 2996dcdc03e872c1534c15750a9f741c6afffbc0 [1] from the portable sndio > repository added a new resampling algorithm. Unfortunately, the origin of > the lookup table isn't clear. Would it be possible to include either the > script used to generate it (as well as other LUTs in the code), or some > reference links? > Here's a program to generate the table. It's not very useful to work on the filter because one needs to plot the filter response, adjust manually parameters, experiment, etc. At least the program contains the exact formula and handles spacing. Not sure what's better: ship the program or explain in detail how the filter works and how coefs are generated (or both) > Furthermore, would you be interested in patches to try and decrease the > amount of duplicated code between aucat/ and sndiod/, if it doesn't prove > too complicated to do? > > [1] https://github.com/ratchov/sndio/commit/2996dcdc03e872c1534c15750a9f741c6afffbc0 > Indeed dec_{mulaw,alaw,float}() could go in their own file leaving dsp.c almost the same. AFAICS, sndiod resampling bits are just a special case of aucat one (aucat needs to work with partial blocks while sndiod doesn't), so sndiod could be switched to use aucat resampler leaving both dsp.c the same. For the Makefile tweakery to use a common source file we need to involve OpenBSD devs. But even if we don't go this way, reducing differences is always welcome I'm using parts of aucat/sndiod in various $DAYJOB projects, and most problems are not caused by having multiple copies of the same file; the most annoying is to deal with small differences in mostly identical files with the same name. My 2 cents
This archive was generated by hypermail 2.3.0 : Tue Aug 09 2022 - 16:23:50 CEST