Whenever I change any audio device settings (buffer size, output device, etc) in Logic, my synth plugin's destructor is called, followed by its constructor. This resets the synth, losing the last settings. Two questions:
1. Can this be avoided?
2. If not, how do you handle it?
The best thing i've got so far is whenever the destructor is called, saving the current setting in a temporary file. And whenever the constructor is called, checking for that temporary file, and if it exists, load those settings, and delete the temporary file. BUT, this only works if I have only one instance of the plugin open. If there are multiple instances then they all reload the same settings from this temporary file. Is there a way to identify the track number of each plugin to give them each a unique tmp file?