Does AudioNode take into account the speed of sound?

Hi,

I was wondering whether the AudioNode is able to use the speed of sound (since sound travels at about 340 [m/s] it takes some time for the sound to reach the listener).

I have implemented sound again in Enemy Ahead (a naval Sim wannabee… :grin:) and when a gun is fired at long distance, I see the nozzle flash but also immediately, I hear the gun sound. What I would like is the sound to reach the listener later.

I could of course create a delay, depending on the distance of the sound source to the listener (distance/soundSpeed) and have the audio wait for that time before playing, but I was wondering if there is already something like that in the source or not.

Husky

I don’t think there is such a delay calculation in the engine. That would mean that you’d have to tell the engine if 1 unit means 1 cm or 100 km or whatever. I think it’s best to leave such knowledge outside the engine.

Plus medium parameters, density etc. It’s quite different on sea level, on top of Everest and, say, on Mars…

Yes I know. Was just wondering if it was already there. I will do the calculations then in my own code.

The speed of sound is only used to simulate the Doppler effect:

OpenAL also fails to take into account sound propagation delays (the speed of sound is used for the Doppler effect only).

1 Like