June 12, 2016
Are there any mechanisms in RackAFX and the resulting plugins that prevents issues with inconstancy in reading and writing parameters from gui to audio processing function? I suppose that the GUI part of RackAFX does not run in same thread or priority as the audio processing function?mand in that case the GUI and variable cooking functions could be interrupted by the audio processing function which then might read corrupted member variables or? Is all the prevented some way?
January 28, 2017
There was, at one time, the use of Events to synchronize these threads (and some of that code is leftover in the FX book which has caused some confusion), but I was advised not to use them because of the thread priority issues between the runtime code and the GUI code where this is ill-advised. You can certainly add that back in, though to date, no race conditions have occurred with the sample code for the book projects and no users have reported any issues.
For the ported projects, there are no issues due to their own internal mechanisms for handling this. This also includes using the RAFX-as-VST2/3 paradigm where the GUI changes are protected so updates are always handled before processing. It is only within RackAFX where this could be an issue, but since it doesn't support automation, the conditions are rare.
Also, I write the update() functions which get called as a result of userInterfaceChange() in a way that copies variables, so there is a bit of protection within the code itself.
I am working on an update for RackAFX for this protection mechanism to be built-in since it is only a possibility within RackAFX itself and not the ported projects.
Most Users Ever Online: 36
Currently Online: W Pirkle
Currently Browsing this Page:
Guest Posters: 1
Newest Members:certvalue111, sobhana s, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc
Moderators: W Pirkle: 140
Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 140