How to use the standardized-audio-context.OfflineAudioContext function in standardized-audio-context

To help you get started, we’ve selected a few standardized-audio-context examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chrisguttandin / web-audio-beat-detector / test / helper / load-fixture.js View on Github external
import { OfflineAudioContext } from 'standardized-audio-context';

const offlineAudioContext = new OfflineAudioContext(1, 1, 44100);

export const loadFixtureAsAudioBuffer = (fixture) => fetch(`/base/test/fixtures/${ fixture }`)
    .then((response) => response.arrayBuffer())
    .then((arrayBuffer) => offlineAudioContext.decodeAudioData(arrayBuffer));
github Tonejs / Tone.js / Tone / core / context / AudioContext.ts View on Github external
export function createOfflineAudioContext(channels: number, length: number, sampleRate: number): OfflineAudioContext {
	return new stdOfflineAudioContext(channels, length, sampleRate) as unknown as OfflineAudioContext;
}