Closed arabek closed 2 years ago
I cannot seem to reproduce this even if I deliberately remove the PulseAudio driver - makes me wonder why your ALSA package doesn't come with it bundled like it does in my case, but that's another story. Which distro are you using and can you post the full log from application start?
that's the thing. I don't. I'm using pipewire as pulseaudio replacement. had hoped the bug report made that clear enough.
I've had a look in snd_alsa.c
and what vkQuake2 is doing is very standard for ALSA. The only thing I can think of is perhaps you don't have a "default" device configured in your ALSA config, or your "default" device is configured to use PulseAudio. My instinct is the latter just based on the error you're getting but not 100% sure. My advice would be to run aplay -L
which will list all of your devices, including the "default" device that vkQuake2 is using. If the "default" device says "Playback/recording through the PulseAudio sound server", I'm pretty sure it's a system configuration error on your end. If that is indeed the problem, I'm not sure how to resolve it.
As for robustness in vkQuake2, what I do in my audio library is first try "default", but then fall back to "dmix", and then "hw" after that. Still, it's expected that users would have a working "default" device because otherwise a whole bunch of ALSA programs are going to break so I don't think it's necessarily a vkQuake2 problem.
I will close this issue, since rewriting the sound driver would be out of the scope of this project and I cannot reliably replicate the problem. There is in fact a fork of vkQuake2 created by @mackron which exclusively uses MiniAudio for sound support, so it might be worth to check it out and see if the problem persists also there.
yet in the same directory:
moreover:
which also seem to be ignored. The initialization code isn't robust enough to handle alsa properly.