Files
lmms/plugins/SpectrumAnalyzer/SaProcessor.cpp
Michael Gregorius 8136b7002c Fix floating point exception in Spectrum Analyzer (#7018)
Fix a floating point exception in the Spectrum Analyzer which occurs if the amplitude is 0. The amplitude is used in the calculation of a logarithm which is not defined for values smaller or equal to 0.

The fix is to replace a value of 0 with the minimum positive float value. Negative values are not handled because it seems that only values greater or equal to 0 are fed into the method. This assumption is asserted in case this ever changes.
2023-12-10 11:42:02 +01:00

24 KiB