Skip to content

Conversation

jpcima
Copy link
Collaborator

@jpcima jpcima commented Apr 27, 2021

This implements a thread-safety measure in the editor, because the Juce-based Carla host sends us the parameter updates in the wrong thread.
This regards the parameters changes of the level meters, performed by the DSP.
If this workaround is not implemented, this messes with the VSTGUI data, most likely the tracking of update rectangles, creating memory corruption.

@falkTX
Copy link
Contributor

falkTX commented Apr 27, 2021

Curious about this, only an issue with carla vst3 hosting?
Does the issue come from juce or carla? any other vst3 host that has this issue too?

@jpcima
Copy link
Collaborator Author

jpcima commented Apr 27, 2021

I can't tell yet about Tracktion, I can give this a check.
We meet this problem since we have a code sends audio levels through parameters.

if (Vst::IParameterChanges* pcs = data.outputParameterChanges) {
int32 index;
if (Vst::IParamValueQueue* vq = pcs->addParameterData(kPidLeftLevel, index))
vq->addPoint(0, left, index);
if (Vst::IParamValueQueue* vq = pcs->addParameterData(kPidRightLevel, index))
vq->addPoint(0, right, index);
}

@jpcima jpcima force-pushed the parameters-thread-safe branch from 2066c0f to 9580ca8 Compare April 27, 2021 16:02
@jpcima
Copy link
Collaborator Author

jpcima commented Apr 27, 2021

@falkTX confirmation that Tracktion Waveform has the problem too. Reaper does not.

@jpcima jpcima merged commit 4110c0e into sfztools:develop Apr 27, 2021
@jpcima jpcima deleted the parameters-thread-safe branch April 27, 2021 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants