GetSamplePos is a host callback (because only the host knows where in the project it is), it's up to the host how expensive the call is.
But, there's no point in calling it inside the loop -- it gives the sample position of the sample buffer passed to the plugin. You can call it once at the top of the function to get the starting position and then just increment in your loop.
|