I suspect the algorithm may be looking at the amplitude of the signal, and not the energy content contained within. According to physics, the energy contained in a waveform is proportional to both amplitude and frequency. In other words, you can increase the energy (and perceived loudness) by increasing either frequency or amplitude.

A consequence of this is that if you compare the waveforms for a high-frequency and low-frequency signal which sound equally loud, the high frequency waveform will have a much smaller amplitude. If you combine the two together, the low frequency waveform will dominate the overall raw shape and height of the waveform. When you extract the spectral response curve from material, you must progressively scale up the upper frequency values in software to account for this effect.

- Chris

_________________________
1995 BMW M3 - 250GB RioCar