Skip to content

Commit

Permalink
worker correction to always compute fft on analyse
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarcosfer committed Feb 3, 2022
1 parent 7a51d90 commit 780cab9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/demos/onsets/src/core/audio-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 780cab9

Please sign in to comment.