Revert "Merge pull request 'supradough poc' (#1362) from supradough into main"

This reverts commit 6f06683d70, reversing
changes made to 637d714ab2.
This commit is contained in:
Felix Roos 2025-09-11 23:19:22 +02:00
parent 6f06683d70
commit c0bf86d11e
No known key found for this signature in database
17 changed files with 63 additions and 1493 deletions

View file

@ -196,7 +196,7 @@ export const resetLoadedSounds = () => soundMap.set({});
let audioContext;
export const setDefaultAudioContext = () => {
audioContext = new AudioContext({ latencyHint: 'playback' });
audioContext = new AudioContext();
return audioContext;
};
@ -212,17 +212,11 @@ export function getAudioContextCurrentTime() {
return getAudioContext().currentTime;
}
let externalWorklets = [];
export function registerWorklet(url) {
externalWorklets.push(url);
}
let workletsLoading;
function loadWorklets() {
if (!workletsLoading) {
const audioCtx = getAudioContext();
const allWorkletURLs = externalWorklets.concat([workletsUrl]);
workletsLoading = Promise.all(allWorkletURLs.map((workletURL) => audioCtx.audioWorklet.addModule(workletURL)));
workletsLoading = audioCtx.audioWorklet.addModule(workletsUrl);
}
return workletsLoading;