JAX Convolutor uses the FFT/iFFT approach for performing realtime convolution. Anyone who has used FFT before, knows, that there must be a certain sufficient audio buffer collected, before the analysis / resynthesis can be performed. These buffers are commonly always a power of two samples large (i.e. 512, 1024, 2048... samples). A realtime audio process provocates conflicts with that, if it forces the rendering buffer sizes down too much. Then the audio processor would be required to perform the FFT/iFFT and all the accumulation to much often. This causes heavy CPU impact. Optimnizations will have not much effect on that.
One solution is to collect the buffers internally and then raise the block calculation merely, if the buffers are filled completely. In the meantime all the samples are delivered that are available and already processed. This is a so-called circular buffer approach, which will introduce a clear latency but usually will improve the performance. It ensures the audio stream continuosity but the processing continuosity will actually become fragmented. So you will notice continuous spikes in the CPU hit, as the frames are processed uneven.
But iOS also continuously produces large CPU spikes, even if the audio processor ensures continuous flow. This is strange as these spikes are caused by the system and obviously inavoidable nor are they controllable. I guess this has much to do with memory management.
Apples mobile operating systems do limit the usage of the processor cycles heavily for allot of reasons. As soon some app or plugin is using a higher performance demand, even in realtime, it will end up in glitches and crackles. It will be throtteled down. This is unavoidable. And this is unthought.
0 Comments