The defaultValue
property of the AudioParam
interface represents the initial value of the attributes as defined by the specific AudioNode
creating the AudioParam
.
Syntax
var gainNode = audioCtx.createGain(); var gainDefault = gainNode.gain.defaultValue; //'gain' is the AudioParam
Value
A float.
Example
var AudioContext = window.AudioContext || window.webkitAudioContext; var audioCtx = new AudioContext(); var gainNode = audioCtx.createGain(); var gainDefault = gainNode.gain.defaultValue;
Specifications
Specification | Status | Comment |
---|---|---|
Web Audio API The definition of 'defaultValue' in that specification. |
Working Draft |