From 96990c88698e412a177c4d7f724cad4f2498c8b1 Mon Sep 17 00:00:00 2001 From: austinhutchen <93489691+austinhutchen@users.noreply.github.com> Date: Thu, 16 May 2024 18:36:25 -0700 Subject: [PATCH] fft --- src/components/pages/sub/AudioVisualizer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/pages/sub/AudioVisualizer.tsx b/src/components/pages/sub/AudioVisualizer.tsx index 37197be4..808ee8c0 100644 --- a/src/components/pages/sub/AudioVisualizer.tsx +++ b/src/components/pages/sub/AudioVisualizer.tsx @@ -50,7 +50,7 @@ export const AudioVisualizer: React.FC = () => { ctx.fillStyle = 'rgba(0, 0, 0,0.1)'; ctx.fillRect(0, 0, canvas.width, canvas.height); - const barWidth:number = 1; + const barWidth:number = Math.ceil(canvas.width / bufferLength); let barHeight; let x = 0;