Skip to content

Fix IIR filter Q becoming negative#1476

Merged
derselbst merged 1 commit intomasterfrom
1464
Jan 25, 2025
Merged

Fix IIR filter Q becoming negative#1476
derselbst merged 1 commit intomasterfrom
1464

Conversation

@derselbst
Copy link
Copy Markdown
Member

@derselbst derselbst commented Jan 25, 2025

Previously, the IIR filter wasn't clearing its previous Q interpolation, causing it to inherit the step factor from an older filter state (after calling e.g. fluid_iir_filter_reset()). This may have caused messing around with the Q, potentially becoming negative, and therefore causing a bunch of inf and nans to be generated whenever Q was passed to log() or sqrt(). This in turn would lead to very high audio gain output. It is not quite clear to me though, why this affected only some audio drivers, when either reverb or chorus was active, and why most notably the file renderer was completely unimpressed by this issue.

This PR properly clears the Q interpolation upon filter startup. Additionally, it was found that calling fluid_sec2tc with zero would have also raised a SIGFPE. This has been fixed as well.

Fixes #1464

@derselbst derselbst added the bug label Jan 25, 2025
@derselbst derselbst added this to the 2.4 milestone Jan 25, 2025
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Nervous Filter.mid has no sound after 19 seconds with GeneralUser-GS.sf2

1 participant