From 780cab9b50a73b7379d41960ef510760e5f33d64 Mon Sep 17 00:00:00 2001 From: Jorge Marcos Date: Fri, 4 Feb 2022 00:44:06 +0100 Subject: [PATCH] worker correction to always compute fft on analyse --- examples/demos/onsets/src/core/audio-worker.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/demos/onsets/src/core/audio-worker.js b/examples/demos/onsets/src/core/audio-worker.js index f40a805..8147b93 100644 --- a/examples/demos/onsets/src/core/audio-worker.js +++ b/examples/demos/onsets/src/core/audio-worker.js @@ -37,10 +37,7 @@ onmessage = function listenToMainThread(msg) { log('received analyse cmd') // const signal = new Float32Array(msg.data.audio); self.signal = msg.data.audio; - - if (self.fftRecomputeNeeded) { - computeFFT() - } + computeFFT(); self.onsetPositions = computeOnsets(); postMessage(self.onsetPositions);