View Single Post
Old 12-29-2018, 11:56 AM   #10
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,711
Default

Quote:
Originally Posted by Nonlinear View Post
OK, so is "Reset()" called by the host? If so, when? I had read elsewhere that Reset() doesn't always work -that's why I started updating everything in Process().
If Reset isn't called at any point by the host(*), the host is plain buggy and you should stop using it. (However, it is possible the host only ever calls it just once and that would be allowed behavior.) It is called before the Process calls start happening. It may be called multiple times too before the Process calls start. Your code should guard against that if you are doing some expensive initialization, for example.

You may be able to do some resetting in the Process call too, but you will need to keep additional tracking member variables to guess if the audio processing should be resetted. It probably isn't worth the trouble since the Reset call is meant to be overridden by the plugin for that purpose.

It's really difficult to understand what is the problem you are having exactly. Can you provide some concrete example of a situation that isn't clear for you?

(*) Technically, the host calls some function or opcode of the plugin format in question and the IPlug wrapper code then calls IPlugBase::Reset.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/

Last edited by Xenakios; 12-29-2018 at 12:02 PM.
Xenakios is online now   Reply With Quote