Some 2.6 SDL2_mixer builds' sounds sound muffled compared to 2.5/SDL1.2_mixer
- 2.6.0-beta0+29c84a15cb msys1 Gtk3, Qt: muffled
- 2.5.8 msys1 Gtk3: less muffled
- 2.6.0-beta0+c8cad4d8dd msys2 Gtk3: less muffled
(Main test case is stdsounds footsteps. For 2.6 also heard start music.)
Could it be that the msys1 package's SDL2_Mixer defaults to an unhelpful sample rate, and we're relying on that default?
#2 Updated by Jacob Nevins 9 months ago
I have not yet tried that. However, I have noticed that I can reproduce the problem on Linux.
S2_5 (gtk2) sounds less muffled than S2_6 (gtk2, built with SDL2 mixer). If I rebuild S2_6 with --enable-sdl-mixer=sdl1.2, it changes to sounding like S2_5.
Freeciv uses MIX_DEFAULT_FREQUENCY, which the header files on my system suggest should be the same for both SDL1 and SDL2 mixer, 22050Hz (from SDL mixer docs: "Most games use 22050, because 44100 requires too much CPU power on older computers.")
#4 Updated by Jacob Nevins 9 months ago
I've created a recording in Audacity that when I play it back demonstrates the difference to my ears.
Captured with PulseAudio "monitor" device. (I set Audacity to 176.4kHz to try to oversample massively, but I've no idea if there's really that much information in the recording pipeline.)
Spectrum of this and other samples I looked at doesn't show any gross difference in top frequency (they both cuts off around 11kHz, consistent with a 22050Hz sample rate), so I no longer think this is a simple sample rate issue.
#6 Updated by Marko Lindqvist 9 months ago
One difference between S2_5 and earlier, and S2_6 and later code is that former set buffer size to 4096 on Windows builds (search S2_5 audio_sdl.c for WIN32_NATIVE). However, since you reproduced on Linux, it seems like removal of that is not related to the issue at hand.
#7 Updated by Jacob Nevins 9 months ago
- Subject changed from 2.6 msys1 builds' sounds sound muffled compared to other builds to Some 2.6 SDL2_mixer builds' sounds sound muffled compared to 2.5/SDL1.2_mixer
Since this isn't a gross error like a too-low sample rate but just a difference in the quality of the sound, perhaps we don't need to treat it as a bug. I won't treat it as blocking a release, anyway.