Module

x/evt/lib/index.ts

šŸ’§EventEmitter's typesafe replacement
Go to Latest
interface dom.AudioBuffer
import { type dom } from "https://deno.land/x/evt@v2.3.1/lib/index.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