There has to be. Every plug-in needs a way to reset buffers when the playhead stops. If it's not called resume, it could be something like "reset".cisdsp wrote:I haven't found out 'til now if there's a resume() in there
You should declare filteredInput[2] in the effect class itself as a member variable and then instantiate/allocate the array using new in the effect's constructor. Then you delete it in the effect's destructor like so:cisdsp wrote: Can you give me maybe a hint how to delete the "new" stuff? I thought must not delete the object " filteredInput[0] = new double[nFrames];" - for example...
Code: Select all
delete[] filteredInput[0];
delete[] filteredInput[1];
Edit: you could actually just put all of the initialization/reallocation in resume as long as you check the right conditions.
When you're using the processing function from thevinn's class, it takes a parameter for the block size to process (inFrames in your previous post) which is equal to the block size of processDoubleReplacing. In the example above, it appears as though your nested filters process one sample at a time. To do the same with the block processing in DSPFilters you would just call each filter's process with the block of audio in series.cidsp wrote: I asked about implementations because of following situation:
I did a four Band Filter with HP and LP with the RBJ Filterclass. This was very easy and fast done. In the Process Block for exampleReally easy to implement.Code: Select all
for(i = 0; ......) { outLeft = HiPass->process(LowShelf->process(Peak1->process(Peak2->process(HiShelf->process(LowPass->process(inLeft)))))); }
With Vinn's Classes it's a little different
I have to figure out how this works.
Code: Select all
LowPass->process(inFrames, inLeft);
HiShelf->process(inFrames, inLeft);
Peak2->process(inFrames, inLeft);
...