Skip to content

Commit

Permalink
FFT fix
Browse files Browse the repository at this point in the history
  • Loading branch information
austinhutchen committed Oct 24, 2024
1 parent f00e31d commit ca6cdaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/common/AudioVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export const AudioVisualizer: React.FC<AudioVisualizerProps> = () => {
if (entry.isIntersecting) {
const audioContext = new (window.AudioContext || window.webkitAudioContext)();
const analyser: AnalyserNode = audioContext.createAnalyser();
analyser.smoothingTimeConstant = 0.1;
analyser.fftSize = 8192 * 2; // Reduce fftSize for better performance
analyser.smoothingTimeConstant = 0.2;
analyser.fftSize = 8192 ; // Reduce fftSize for better performance
// Create a BiquadFilterNode
const filter = audioContext.createBiquadFilter();
filter.type = 'bandpass'; // set the filter type to low-pass
Expand Down

0 comments on commit ca6cdaa

Please sign in to comment.