Skip to content

How to determine whether a node's data callback will be called ("active" in the graph)? #704

Answered by mackron
khiner asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for my exceptionally slow response to your questions. So miniaudio doesn't explicitly expose connection state retrieval APIs, the main reason being that the node graph is (mostly) lock-free while being thread-safe and as a result is rather non-trivial. A simple API like ma_node_is_connected() is not quite a simple as it sounds. However, typically a program will be maintaining it's own state and will have some kind of knowledge of the connection status, such as whatever logic was used when deciding to call ma_node_attach/detach_output_bus() in the first place. That's what I'd recommend you do in you case, which sounds just like your third suggestion.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by khiner
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants