AudioListener.speedOfSound

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The speedOfSound property of the AudioListener interface is a double value representing the speed of sound, in meters per second.

The speedOfSound property's default value is 343.3 m/s and is used to calculate the doppler shift appropriate for the speed the panner is traveling at (as defined by PannerNode.setVelocity.)

Note: Bear in mind that no propagation delay is automatically applied to a sound far from the listener.

Value

A double.

Examples

See BaseAudioContext.createPanner() for example code.

Browser compatibility

BCD tables only load in the browser

See also