Zebediah Figura z.figura12@gmail.com writes:
As far as I know there's no way to keep this structure without either using macros or rewriting the same function 20 times, neither of which is very desirable. On the other hand, might it be worth sacrificing a slight bit of efficiency (which may not even be that much) as in the attached patch?
You'd probably want to measure it, but I expect that one function call per sample is going to be a lot more than a slight inefficiency. That may or may not matter in actual usage of course.