hvcc/generators/ir2c/static/HvSignalEnvelope.c
The inputs are stored in the internal buffer as squared, which is good, but the sum is performed all at once when the result is needed. This will cause a spike in CPU usage instead of having even CPU usage across all audio callbacks which would start causing dropouts while the average CPU usage is still low.
The sum should instead be computed incrementally at every callback. This would require adding a running sum variable per eachwindowSize/period element to the base struct.
I can look into implementing this, posting here ahead of that for any feedback.
hvcc/generators/ir2c/static/HvSignalEnvelope.c
The inputs are stored in the internal buffer as squared, which is good, but the sum is performed all at once when the result is needed. This will cause a spike in CPU usage instead of having even CPU usage across all audio callbacks which would start causing dropouts while the average CPU usage is still low.
The sum should instead be computed incrementally at every callback. This would require adding a running sum variable per each
windowSize/periodelement to the base struct.I can look into implementing this, posting here ahead of that for any feedback.