This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

speedOfSound

Summary

The speed of sound used for calculating doppler shift. The default value is 343.3 meters / second.

Property of apis/webaudio/AudioListenerapis/webaudio/AudioListener

Syntax

var result = AudioListener.speedOfSound;
AudioListener.speedOfSound = value;

Return Value

Returns an object of type NumberNumber

Examples

var audioCtx = new AudioContext();
var myListener = audioCtx.listener;
myListener.speedOfSound = 343.3;

Related specifications

W3C Web Audio API
W3C Editor’s Draft