PluginEditor/PluginProcessor Single Reader/Writer Communication


First of all, please excuse any noobness as I’m quite new to this kind of thing :wink:

My Editor contains a Component where you are able to draw arbitrary curves. I’m using a TimerCallback to update the curve as well as write the yValues into an AudioBlock. The PluginProcessor reads that AudioBlock, applies modulation to it and copies it to another AudioBlock, which then gets read by the Editor again for visualisation (in a different Component).
I need to avoid though that the Processor reads from the AudioBlock while the Editor tries to write to it. So I was thinking about implementing something like an Single Reader/Writer class that manages two AudioBlocks with some logic to avoid that.
However I think some JUCE class could already provide me with something like that?


Nevermind, I found a very simple way to do this by using just a boolean :wink: