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 interruptions of real-time playback #1494

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Fix interruptions of real-time playback #1494

wants to merge 28 commits into from

Conversation

derselbst
Copy link
Member

@derselbst derselbst commented Mar 1, 2025

PR #1432 introduced an on-the-fly recalculation of the filter coefficients, whenever the filter parameters change. It turns out this consumes too much CPU for voices that heavily depend on e.g. modulating the IIR filter.

This PR addresses this problem by avoiding direct calls to sin() and cos() and instead using a lookup table for calculating the filter coefficients.

TODO:

  • Eliminate the dependency on the sample rate in fluid_iir_filter_init_table()

Fixes #1481

@derselbst derselbst marked this pull request as ready for review March 9, 2025 13:48
Copy link

sonarqubecloud bot commented Mar 9, 2025

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.

High CPU usage may impair real-time playback
2 participants