Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility structs to make it easier to make plugins thread safe. #85

Merged
merged 4 commits into from Apr 7, 2019

Conversation

@askeksa
Copy link
Contributor

askeksa commented Mar 16, 2019

This is a couple of structs to make it easier to handle the communication between the UI and processing threads. In particular, they will help when porting VST plugins from the old to the new API after #65 lands. The plan is to add an example (based on transfer_and_smooth) containing a detailed guide on how to port an existing plugin using ParameterTransfer.

Before merging this, I would like some feedback on these issues:

  1. General proofreading of the documentation. Is it adequate?

  2. The AtomicFloat struct is specialized to Relaxed ordering, because this is what is usually needed for VST parameters. For this reason, its accessors are called get and set instead of the usual load and store of atomics. An alternative could be to just have load and store operations that include an ordering parameter.

  3. A review of the ParameterTransfer data structure, especially its use of atomics. I have convinced myself that it upholds its promises no matter what happens, but more eyes are always useful.

Both structs have been tested in real VST use with the exact same code as in this PR - AtomicFloat as part of the examples in #65, and ParameterTransfer as part of transfer_and_smooth.

@askeksa askeksa requested a review from raphlinus Mar 30, 2019
@askeksa askeksa merged commit 3c0d203 into RustAudio:master Apr 7, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.