sensorium / Mozzi

sound synthesis library for Arduino
https://sensorium.github.io/Mozzi/
GNU Lesser General Public License v2.1
1.06k stars 185 forks source link

Fix duplicated enum between StateVariable and ResonantFilter #172

Closed tomcombriat closed 1 year ago

tomcombriat commented 1 year ago

This fixes #171. @tfry-git and @sensorium if you comments on the naming please let me know.

Otherwise I'll merge it soon!

Cheers, Tom

tfry-git commented 1 year ago

An alternative might be to share the same enum between both classes. I see no immediate downside to having one header including the other (ok, compilation will be a miniscule bit slower, but the compiled code should not be any different), so it would only have to be defined in one of them. This would avoid the cumbersome naming.

tomcombriat commented 1 year ago

Ah yeah, this came to mind at some point but was feeling a bit unconfident about for instance including ResonantFilter.h into StateVariableh. I guess compilation will be a bit longer, but the "unneeded" functions should not be included into the final executable right?

tomcombriat commented 1 year ago

@tfry-git It compiles fine. ~(Sorry for three commits for one line, will try to squash them)~ Have squashed them.