Skip to content

Sharing state with an audio thread #300

Answered by arximboldi
nebularnoise asked this question in Q&A
Discussion options

You must be logged in to vote

Good question and very detailed eye ;)

Option 1 is what I use in my code. You can wrap the pattern with some utilities to make it safe and easy for the user. It works well in practice and I never needed anything else.

Memory policies sadly can't be used for this purpose the way they're currently designed. I could envision API changes that would allow it (basically allowing the implementation of option 1 under the hood), but as I just mentioned, the workaround was good enough for me.

Replies: 2 comments 1 reply

Comment options

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

You must be logged in to vote
1 reply
@arximboldi
Comment options

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