Version: simutrans r6913, linux-amd64, sdl2-backend, pak64
The sounds Water.wav and arctic.wav produce only noise and not the expected sound.
When I resample them to a multiple of 11025Hz using sox, they play alright.
Sounds more like an error of SDL2 then. They are legal wavefiles.
I can reproduce this problem as well. Turns out there's an open bug (https://bugzilla.libsdl.org/show_bug.cgi?id=58) from 2006 where SDL 2.0 can only convert samples if the difference between their sample rate and the game's sample rate is a power of 2.
Given that that bug has been open for essentially forever, I wouldn't hold out hopes for a fix. Would it be possible to instead replace those sound files with ones that are at 11025 or 22050 Hz? Basically as captain crunch described. I think the following files are affected:
pak64/sound/arctic.wav
pak64/sound/planelow.wav
pak64/sound/Water.wav
pak128/sound/horsegallop2.wav
Some of them I got with lower rate. But indeed, I can convert them. (Although it is strange that SDL cannot cope with 44100 and 48000 samples at the same time ...
Is SDL2 really doing the mixing itself? I thought those days were over, with every contemporary low-level sound API I know exposing abstracting mixing to hardware or software, even with mixed sampling rates.
Thanks, I fixed the paks.
Yay, thanks!