AudioBufferSourceNode
An AudioScheduledSourceNode which represents an audio source consisting of in-memory audio data, stored in an AudioBuffer. It's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network.
interface AudioBufferSourceNode extends AudioScheduledSourceNode {
buffer: AudioBuffer | null;
readonly detune: AudioParam;
loop: boolean;
loopEnd: number;
loopStart: number;
readonly playbackRate: AudioParam;
addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(
type: K,
listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(
type: K,
listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;start(
}when?: number,
offset?: number,
duration?: number,
): void;var AudioBufferSourceNode: {
prototype: AudioBufferSourceNode;
new (context: BaseAudioContext, options?: AudioBufferSourceOptions): AudioBufferSourceNode;
};§Properties
§
buffer: AudioBuffer | null
[src]§
readonly detune: AudioParam
[src]§
readonly playbackRate: AudioParam
[src]§Methods
§
addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(
[src]type: K,
listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(
[src]type: K,
listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void