In the AudioDeviceManager::audioDeviceIOCallbackInt
method, I found this piece of code:
for (int chan = 0; chan < numOutputChannels; ++chan)
{
if (auto* src = tempChans [chan])
if (auto* dst = outputChannelData [chan])
for (int j = 0; j < numSamples; ++j)
dst[j] += src[j];
}
If modified to the following code:
for (int chan = 0; chan < numOutputChannels; ++chan)
{
if (auto* src = tempChans [chan])
if (auto* dst = outputChannelData [chan])
FloatVectorOperations::add (dst, src, numSamples);
}
Can it perform better? Because the method in FloatVectorOperations
uses SIMD acceleration, the original manual addition of AudioDeviceManager
will not use SIMD acceleration (the compiler may give optimization, but this performance becomes dependent on the behavior of the compiler).
So can it be optimized here?