Posted August 06, 2019
I have used 44100 as my default sample rate for my audio devices for many years. This should not make any difference to ALSA clients, as my default audio device uses "plug" for automatic rate conversion. However, when I tried to get this game running, I discovered that there are actually programs that insist on a particular low-level sample rate. Zombie Night Terror insists on 48k, and is mute if it doesn't get what it wants. At first, I thought it was mute because audio initialization was failing (with messages in Player.log), but that turned out to be the fact that if pcm.default isn't 48k, it would try pcm.sysdefault, which failed because it doesn't use the same dmix channel as default. Aliasing sysdefault to default fixed the error, but didn't fix the muting. Only setting all my low-level hardware devices to 48k fixed that. Now, a few weeks later, I discover that there were other programs that also insist on a particular sample rate. FreeSpace 2 Open 3.8.0 does this, but it insists on 44.1k. Failure to use 44.1k causes the game to immediately complain and exit. Now I have to switch sample rates, which requires killing/restarting all other audio clients, in order to switch games. Lovely. Using the rate plugin instead of/in addition to plug, or layering plugins with forced slave rates doesn't do anything. Maybe it's time for me to finally join the pulseaudio herd. I doubt anybody's actually doing any high-level work on ALSA any more, anyway, since all distros now default to pulse. ALSA documentation and diagnostics suck, anyway: I had to trace the 48k issue using gdb to figure it out.