I'm looking for a function, where i can add my code to store my Plugin if the User safes his DAW Projekt, or is closing the Project, also I'm looking for where i can add my code if a user is loading a project with my plugin to recall the old settings.
In which file format i have to safe/load the settings?!
AudioProcessor::setStateInformation
&&
AudioProcessor::getStateInformation
are already implemented but "getStateInformation" is only calling when i press the load button from the Plugin.
"setStateInformation" is called when i safe the Projekt, but i cant see a standard file Path or a standard name.
//Edit
I had a second look into the AudioProcessor Api and founded:
but if i add them to my code Live is crashing when i try to safe a project with my Plugin and i cant reach booth function with a breakpoint, so it seems like I'm on the wrong place?!
setCurrentProgramStateInformation(const void * data, int sizeInBytes)
I added both functions and put a Debug output in them + sat a breakpoint, but nothing happend in Ableton(9.2.2) & Juce Demo Host. The breakpoints are also not reached
workaround for what? It does work, that's how all plugins load/save their settings.
It's up to the host to decide when it calls those methods, so maybe save your project or something to trigger it. Or use the juce demo host as a test harness for more control.