Skip to content

Commit 2e491a2

Browse files
author
Ritika Mishra
committed
pulled changes
1 parent 60a30c9 commit 2e491a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/FFT.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const FFT = forwardRef(
161161
);
162162
}
163163
};
164-
const filter = new SmoothingFilter(128, 1);
164+
const filter = new SmoothingFilter(40, 1);
165165

166166
useImperativeHandle(
167167
ref,
@@ -178,7 +178,7 @@ const FFT = forwardRef(
178178
samplesReceived++;
179179

180180
// Trigger FFT computation more frequently
181-
if (samplesReceived % 15 === 0) { // Changed from 25 to 5
181+
if (samplesReceived % 20 === 0) { // Changed from 25 to 5
182182
const processedBuffer = fftBufferRef.current[i].slice(0, fftSize);
183183
const floatInput = new Float32Array(processedBuffer);
184184
const fftMags = fftProcessor.computeMagnitudes(floatInput);

0 commit comments

Comments
 (0)