The IPlugChunks example does not appear to restore correctly in VST2. When some slider elements are changed in a REAPER project which is then saved and recalled, the slider elements that were not changed do not draw. (see image linked below)
it works for me, can you double check?
I never needed to override SerializeParams/UnserializeParams to make chunks work correctly in VST2.
I observe in my own plug-in that "MakeDefaultPreset" now somehow causes UnserializeState to never get called by the host. I removed MakeDefaultPreset from my code, and SerializeState/ UnserializeState gets called a lot, I still don't have it working correctly.
I don't understand why SerializeState seems to always run before UnserializeState. I suspect it is overwriting the chunk before it can be read.
the project you sent works fine with my binary as soon as I draw new values and save. Can you try this binary:
are you using reaper x64? I just updated to the latest pre-release of the 32bit versions and it still works fine for me!
it even works fine in reaper64 with the bridge. can you try the binary i sent in a different host?
this is really confusing because it works absolutely fine in all those hosts on my machine. Are you sure that there are no old versions of IPlugChunks in your VST plugins path that are getting loaded instead?
OK, my bad. I just pushed an update that should fix the chunks example with VST2. Needed to initialise the state properly. Which I had done on my end after building the binary that I sent you. I did it by calling RestorePreset(0) at the end of the plugin constructor, but you could also do it by manually filling the array of step values in the IControl and the plugin class member.
if you want, send me some src code. I'd like to make sure my changes WRT chunks in IPlugBase are sane