Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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;
}
;

§Properties

§
readonly duration: number
[src]
§
readonly length: number
[src]
§
readonly numberOfChannels: number
[src]
§
readonly sampleRate: number
[src]

§Methods

§
copyFromChannel(
destination: Float32Array,
channelNumber: number,
bufferOffset?: number,
): void
[src]
§
copyToChannel(
source: Float32Array,
channelNumber: number,
bufferOffset?: number,
): void
[src]
§
getChannelData(channel: number): Float32Array
[src]