Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

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 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 March 30, 2019 19:33
@askeksa askeksa merged commit 3c0d203 into RustAudio:master Apr 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant