VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

My application currently uses the following IIR RC-based filtering:
https://bitbucket.org/superfury/commonemufram … pport/filters.c

The main issue that happens with it is if the updateSoundFilter function is hammered by small increments of different filter frequencies (like a MIDI note modulating the lowpass filter frequency based on modulation wheel moved up and down or modulating by input (sinus etc.)). This can and will cause audio to stutter right now because the calculation of alpha becomes too heavy.

Does anyone know if there's a good way to optimize it without losing accuracy?

Edit: More precalcs. Still hammered in some cases though (during Jazz Jackrabbit MIDI collection's bonus stage from JJ1 for example, taking about 20% time according to UniPCemu's speed indicator dipping to 80%).
https://bitbucket.org/superfury/commonemufram … pport/filters.c

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io