Closed giuliomoro closed 3 years ago
We would hope to avoid checking at every sample though when the channel changes at audio rate. Issue is that not checking will cause a segmentations fault which is probably not very expected of a language like Sc ... 👍
So, if I get it correctly, we can't avoid having this check, and my best bet would be to do it at least only when the input changes. If someone changes it every sample at audio rate, they'll get a check (and a warning if needed) at audio rate :)
yes that seems right.
this has been sorted as much as possible in #76 : warning is printed every time analogPin changes and is out of range. So unless you are changing it at audio rate and keep pushing it out of range, you won't get flooded by warnings. Still, could use some added throttling to handle that case, but it's probably good enough as it is.
I'm on a Bela mini, so no analogOut channels, and I get insistent warnings, since they are printed in AnalogOut_next_aaa. What if we cache analogPin and print the warning only when it changes?