Skip to content

Commit

Permalink
subverting pedantic tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumer committed Nov 6, 2024
1 parent a144e2f commit 0595aaf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/dsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ export const dsp = (options: DspOptions = {}) => {

let dsp: AudioWorkletNode;

audioCtx.audioWorklet.addModule(workletUrl).then(() => {
dsp = new AudioWorkletNode(audioCtx, 'zenfs-dsp');
dsp.connect(audioCtx.destination);
dsp.port?.postMessage(audioBuffer);
}).catch(e => {});
audioCtx.audioWorklet
.addModule(workletUrl)
.then(() => {
dsp = new AudioWorkletNode(audioCtx, 'zenfs-dsp');
dsp.connect(audioCtx.destination);
dsp.port?.postMessage(audioBuffer);
})
.catch(e => {});

// add a click-handler to resume (due to web security) https://goo.gl/7K7WLu
document.addEventListener('click', () => {
Expand Down

0 comments on commit 0595aaf

Please sign in to comment.