ColinP wrote: ↑Fri May 13, 2022 4:46 pm
In your little experiment did you look at different buffer sizes? I'd expect things would get skewed if you were dividing by anything where the buffer size was larger than the divisor. If not that would be very curious.
Ah, reading back, I may very well have misled you. My bad.
The "audio phase" of ProcessSample() is executed every sample period.
The "control phase" of ProcessSample() is executed every N sample periods, where N is the divider setting.
I put my
"BATSH*T CRAZY BONKERS (tm)" lump of heavy-duty code (1,000 double-precision log(x) and 1,000 double-precision exp(x)) within the
"control phase".
This means that where N is 1, you max out the processor because you're executing the BCB code 100% of the time.
With N set to 4, you are only executing the BCB code 1 out of every 4 cycles, i.e. 25% of the time. If you set N to 256 and your buffer size was only 64 samples, then you would get 1 execution of the BCB code segment every four BUFFERS.