The fix is simple, move the relevant lowpass filter code in sound.c into YM2149_NextSample_250 where they can apply at the output audio rate instead.
This restores the previous behaviour of these filters as intended. However, this brings me to a second suggestion.
The two lowpass filters provided have very poor quality, extremely distorted sound. This is due to them applying asymmetrically with a hard break point in the middle. I assume this is modeled on some version of STF circuitry, and probably there exists some hardware that does sound this bad, but my own STs certainly don't sound anywhere near as distorted as this.
As a substitute, which I would suggest using as a default, I made a third filter option which uses coefficients borrowed from the other filter, but with only a symmetrical application as a simple IIR filter. This produces a very clean lowpass filter, attenuating the undesirable high frequencies with no added distortion.
Finally I added a config option to select both the LPF and HPF filters, for users that have preferences about them.
The code changes are very small and simple, I've included them below. This is a modification of the 2.4.1 release source. As a summary:
- In sound.c moved the lowpass filters into YM2149_NextSample_250.
- In sound.c added IIRLowpassFilter as an alternative, made the default.
- In configuration.c added YmLpf and YmHpf options.




