When conducting a pluginval test with strictness level 10, restoration of first parameter in APVTS fails sporadically, resulting in the first parameter occasionally receiving incorrect values.
Results of testing AudioProcessorValueTreeStateTutorial project
Starting tests in: pluginval / Plugin state restoration...
!!! Test 1 failed: Gain not restored on setStateInformation -- Expected value within 0.1 of: 0.583364, Actual value: 0.75
FAILED!! 1 test failed, out of a total of 2
Do you have the ārandomise testsā feature enabled in pluginval? There may be a bug in pluginval that could cause this, as discussed in this thread:
Yep, thatās been bugging me for a while too. I described the problem here (including possible fixes):
It affects both AudioParameterBool and AudioParameterChoice. If Iām not mistaken, to really get rid of the error, the fix needs to be applied to both the plugin and pluginval itself.
Edit: just noticed itās not about a bool or choice, so itās probably a different bug. Nevermind.
Is there any place in your code where you set the value of the gain parameter? If so, could this happen during state storing or restoring?
If affected by another parameter, did you flag this other parameter as a meta-parameter (that can change other parameters)? If not, auval will fail anyways.
If youāre confident that youāre not encountering any other issues mentioned in this thread or other state-specific problems, then this is likely the cause. You can try running pluginval without randomized tests to see if the problem still occurs intermittently.