Skip to content

Commit 8bedee1

Browse files
committed
add _onNewInput to FFT
1 parent 2f022c9 commit 8bedee1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/fft.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,11 @@ class FFT {
614614

615615
return octaveBands;
616616
}
617+
618+
_onNewInput() {
619+
// disconnect FFT from sketch when something is connected
620+
p5sound.fftMeter.disconnect();
621+
}
617622
}
618623

619624
// helper methods to convert type from float (dB) to int (0-255)

0 commit comments

Comments
 (0)