Skip to main content
Module

x/evt/mod.ts>dom.AudioBuffer

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.AudioBuffer
import { type dom } from "https://deno.land/x/evt@v2.3.1/mod.ts";
const { AudioBuffer } = dom;

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.

Properties

readonly
duration: number
readonly
length: number
readonly
numberOfChannels: number
readonly
sampleRate: number

Methods

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