improve scope memory footprint

This commit is contained in:
Felix Roos 2024-03-17 01:58:30 +01:00
parent cdc200e1da
commit 16506c5ae2
3 changed files with 26 additions and 18 deletions

View file

@ -220,6 +220,7 @@ export let analysers = {},
export function getAnalyserById(id, fftSize = 1024) {
if (!analysers[id]) {
// make sure this doesn't happen too often as it piles up garbage
const analyserNode = getAudioContext().createAnalyser();
analyserNode.fftSize = fftSize;
// getDestination().connect(analyserNode);