Skip to content

Commit 7562ee6

Browse files
committed
bugfixes
1 parent 27a6f4a commit 7562ee6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usermods/audioreactive/audio_reactive.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ void FFTcode(void * parameter)
795795
#endif
796796

797797
#ifdef FFT_USE_SLIDING_WINDOW
798-
memcpy(oldSamples, valFFT+samplesFFT_2, sizeof(float) * samplesFFT_2); // copy last 50% to buffer (for sliding window FFT)
798+
memcpy(oldSamples, valFFT+samplesFFT_2, sizeof(FFTsampleType) * samplesFFT_2); // copy last 50% to buffer (for sliding window FFT)
799799
haveOldSamples = true;
800800
#endif
801801

@@ -824,7 +824,7 @@ void FFTcode(void * parameter)
824824
#endif
825825
}
826826
}
827-
newZeroCrossingCount = (newZeroCrossingCount*341)>>9; // multiply by 1/3 to reduce value so it typically stays below 256
827+
newZeroCrossingCount = (newZeroCrossingCount*341)>>9; // multiply by 2/3 to reduce value so it typically stays below 256
828828
zeroCrossingCount = newZeroCrossingCount; // update only once, to avoid that effects pick up an intermediate value
829829

830830
// release highest sample to volume reactive effects early - not strictly necessary here - could also be done at the end of the function

0 commit comments

Comments
 (0)