dxx-rebirth/similar/arch
Kp 9fd0cc96a5 Use correct coefficient table for 11Khz sounds
The new resampler sets upFactor to either `2` (for 22Khz sounds) or
`4` (for 11Khz sounds).  However, the logic to pick which coefficient
table to use tested for `0` versus non-zero, so it always picked the
coefficient table meant for 22Khz sounds, even when the sample was an
11Khz sound.  This caused a high pitched ringing in sampled sounds.
Switch to use an `enum class` to prevent using zero-vs-nonzero tests
without a cast.  Change the existing test to test for the 22Khz `enum`
value, as originally intended.  In testing, this eliminated the ringing
effect in 11Khz sounds.

Identified-by: Chris <https://forum.zdoom.org/viewtopic.php?p=1234989> (in response to a request by KynikossDragonn)
Fixes: 5165efbc46 ("Use custom fixed-point audio resampler: - Hopefully fixes issues with poor quality resampling when using SDL_AudioCVT - Converts 11025 Hz or 22050 Hz samples to the default 44100 Hz outputs - Uses high order brick wall filter like Sound Blaster 16")
2023-01-08 14:19:52 +00:00
..
ogl Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
sdl Use correct coefficient table for 11Khz sounds 2023-01-08 14:19:52 +00:00
win32 Add Windows version resource for Windows build 2022-09-11 17:00:45 +00:00