AudioBuffer
A short audio asset residing in memory, created from an audio file using the AudioContext.decodeAudioData() method, or from raw data using AudioContext.createBuffer(). Once put into an AudioBuffer, the audio can then be played by being passed into an AudioBufferSourceNode.
interface AudioBuffer {
readonly duration: number;
readonly length: number;
readonly numberOfChannels: number;
readonly sampleRate: number;
copyFromChannel(
destination: Float32Array,
channelNumber: number,
bufferOffset?: number,
): void;copyToChannel(
source: Float32Array,
channelNumber: number,
bufferOffset?: number,
): void;getChannelData(channel: number): Float32Array;
}var AudioBuffer: {
prototype: AudioBuffer;
new (options: AudioBufferOptions): AudioBuffer;
};