Replies: 1 comment
-
It's typed as void to avoid the need for a cast when passing in different types of nodes. I have no intention on changing this sorry. Moving to discussion section. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
i am using miniaudio pretty heavily in my project and i came up with a question regarding your API design.
ma_node_attach_output_bus() accepts ma_node* (which is an alias for void*). This can easily be misused since you cannot prohibit an implicit conversion to void*. Unfortunately, this caused a lot of headache for me while finding a bug (on my side).
So, my suggestion: if ma_node_attach_output_bus() would accept a ma_node_base* instead, misusage could be avoided. And i see, that within ma_node_attach_output_bus() ma_node* is casted to ma_node_base* anyways.
Had there been any specific reason, why ma_node is an alias for void?
Thanks.
BR
Manuel
Beta Was this translation helpful? Give feedback.
All reactions