UNPKG

standardized-audio-context

Version:

A cross-browser wrapper for the Web Audio API which aims to closely follow the standard.

7 lines 277 B
export const computeBufferSize = (baseLatency, sampleRate) => { if (baseLatency === null) { return 512; } return Math.max(512, Math.min(16384, Math.pow(2, Math.round(Math.log2(baseLatency * sampleRate))))); }; //# sourceMappingURL=compute-buffer-size.js.map