This interface represents a memory-resident audio asset (for one-shot sounds and other short audio clips). Its format is non-interleaved IEEE 32-bit linear PCM with a nominal range of -1 -> +1. It can contain one or more channels. It is analogous to a WebGL texture. Typically, it would be expected that the length of the PCM data would be fairly short (usually somewhat less than a minute). For longer sounds, such as music soundtracks, streaming should be used with the audio element and MediaElementAudioSourceNode.
An AudioBuffer may be used by one or more AudioContexts.
Duration of the PCM audio data in seconds.
Length of the PCM audio data in sample-frames.
The number of discrete audio channels.
The sample-rate for the PCM audio data in samples per second.
Returns the Float32Array representing the PCM audio data for the specific channel.
The channel parameter is an index representing the particular channel to get data for. An index value of 0 represents the first channel. This index value MUST be less than numberOfChannels or an exception will be thrown.
Float32Array