Plugin parameters not initialised on first plugin loading [SOLVED]

When I load my plugin in a host (tried REAPER and Bitwig) the intended default parameter values are not set, I have to first touch or move the controls a bit (it uses host GUI) then it works correctly.
Loading a saved project with it is also fine, it’s just the very first plugin loading where this happens.

What am I doing wrong?
Code is here (pretty basic…):

Windows VST3 x64 build to try:
https://www.dropbox.com/s/676i12qcpirqjyi/Lauridsen-Schodder-Stereo.vst3.zip?dl=1

You can check as follows:
When inserting it on a audio track, start playing, the delay is much too long, dry/wet is also wrong.
Touch/move the controls a tiny bit, and it’s correct.

Thanks.

This is solved, I simply didn’t init the Processor (DSP) parameters properly on construction, duh.

(For delay length this was a bit tricky, because sample rate is not available in constructor, but I do it one time in prepareToPlay() instead).

Hello, having this issue. What do you mean buy “init the Processor (DSP) parameters properly on construction” ? Even if I have an updateParams() function which does the neccessary work called in the prepareToPlay() function I don’t get the parameters to load until I use the GUI…

Hi,

you can have a look at my source (here I init the DSP params), I use the host (generic) GUI for my plugin though, not sure that makes a difference.

edit:
This is only for loading the plugin for the very first time.
When loading with a saved project it is handled via {get,set}StateInformation().