Revert "Merge pull request 'supradough poc' (#1362) from supradough into main"
This reverts commit6f06683d70, reversing changes made to637d714ab2.
This commit is contained in:
parent
6f06683d70
commit
c0bf86d11e
17 changed files with 63 additions and 1493 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue