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.

buffer

Summary

Represents the audio asset to be played.

Property of apis/webaudio/AudioBufferSourceNodeapis/webaudio/AudioBufferSourceNode

Syntax

var result = AudioBufferSourceNode.buffer;
AudioBufferSourceNode.buffer = value;

Examples

var source = audioCtx.createBufferSource();
// from audioCtx.createBuffer, or audioCtx.decodeAudioData
source.buffer = myBuffer;

Related specifications

Web Audio API
W3C Editor’s Draft