Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IIR filter Q becoming negative #1476

Merged
merged 1 commit into from
Jan 25, 2025
Merged

Fix IIR filter Q becoming negative #1476

merged 1 commit into from
Jan 25, 2025

Conversation

derselbst
Copy link
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
@derselbst derselbst merged commit 124267d into master Jan 25, 2025
73 of 79 checks passed
@derselbst derselbst deleted the 1464 branch January 25, 2025 19:38
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