Advertisement

Xaudio sound intensity and inverse square distance

Started by October 30, 2021 08:09 AM
2 comments, last by esenthel 3 years, 1 month ago

I've just noticed that when using Xaudio the sound intensity follows formula:

volume=1/distance

However the correct according to https://sound.pressbooks.com/chapter/intensity-and-distance-april-2019-version/​ should be:

volume=1/(distance*distance)

Is there any way to change the default to correct formula?

I'm using X3DAudioCalculate

Example:

I've played sound at (1,0,0) position, then (2,0,0), then (4,0,0)

Listener is at (0,0,0)

Recorded system audio using GoldWave program, got following results:

X3DAUDIO_DSP_SETTINGS.pMatrixCoefficients were full=1, then 1/2, then 1/4

But shouldn't the expected values be 1, then 1/4, then 1/16?

This is a common confusion that arises from the difference between sound intensity and sound pressure. Sound intensity is an energy quantity that does indeed fall off like 1/(r*r). However, we don't hear sound intensity/energy, we hear pressure, which is proportional to the square root of intensity. Thus, sound pressure falls off like 1/r. XAudio is indeed correct.

Think of sound waves as being like complex numbers - the pressure you hear is the real part of the complex number as it oscillates around the unit circle, while the intensity/energy is (real*real + imaginary*imaginary). To convert from pressure to intensity, you can assume an imaginary part (e.g. via Hilbert transform), and then compute energy by computing the squared magnitude of the complex number. To convert from intensity to pressure, you can take the square root and then assume some phase of the complex number (e.g. 0 or random) to determine the real pressure.

Advertisement

Thanks for the clarification. I was thinking it might be something related to that, but wanted to hear opinion/confirmation of someone more knowledgeable about that.

This topic is closed to new replies.

Advertisement