Quote:
Originally Posted by Nonlinear
I have been initializing my variables, arrays, etc., in the plugin constructor and updating in the Process() block before the process loop. Is that wrong?
|
Yeah, just initializing in the constructor is not really enough. You have more up to date information available in the Reset call like the maximum buffer size the host is going to use and the sample rate, so that's really the proper place to do the DSP initializations.
How you deal with your variables in your Process method is up to you and what you need to do. Obviously many algorithms will need their variables to remain at their last values between the Process calls, so you should not be resetting them at every Process call. (And in that case they should be member variables of the plugin class. NEVER use global or static variables that you are going to modify in a plugin.)