Fix NaNs in basic filters and Equalizer (#7141)

Fix several NaNs in the context of the basic filters and the Equalizer.

The coefficients of the `BiQuad` were not initialized which seems to have led to NaNs down the line.

Fix a division by zero in `EqEffect::peakBand` and `EqSpectrumView::paintEvent` if the energy is zero.

The condition `m_peakSum <= 0` was removed from `EqSpectrumView::paintEvent` because the value is initialized to 0 down the line and later only potentially positive values are added.
This commit is contained in:
Michael Gregorius
2024-03-11 22:38:45 +01:00
committed by GitHub
parent 1be2a20661
commit 227fc47a97
3 changed files with 15 additions and 6 deletions

View File

@@ -144,7 +144,12 @@ template<ch_cnt_t CHANNELS>
class BiQuad
{
public:
BiQuad()
BiQuad() :
m_a1(0.),
m_a2(0.),
m_b0(0.),
m_b1(0.),
m_b2(0.)
{
clearHistory();
}