fabiangreffrath / crispy-doom

Crispy Doom is a limit-removing enhanced-resolution Doom source port based on Chocolate Doom.
https://fabiangreffrath.github.io/crispy-homepage
GNU General Public License v2.0
800 stars 131 forks source link

Can't hear item pickup sound on chocolate-doom.org win32 build #718

Open pmarks-net opened 3 years ago

pmarks-net commented 3 years ago

I'm using DOOM1.WAD on Windows 10, with all default settings.

When I run http://latest.chocolate-doom.org/crispy/crispy-doom-20210215-win32.zip, I can hear music and most of the sound effects, except that ammo/health item pickups are silent; they're supposed to make a "ba-dah-duh" sound.

If I instead run https://github.com/fabiangreffrath/crispy-doom/releases/download/crispy-doom-5.10.0/crispy-doom-5.10.0-win32.zip, the sound all works fine.

fabiangreffrath commented 3 years ago

The difference between these two builds is that the development snapshot hosted on latest.c-d.org is compiled against an SDL2 library which in turn is built without Direct-X support. The release binary, though, is built with full features. So, this is pretty sure a driver problem.

RamonUnch commented 3 years ago

Basically to make a resume there are 4 ways to play sounds under windows 1) WINMM api (waveOut) -> available since WinNT3.1/Win95, up to Win10 and and SDL1/2. Always works but not great! 2) Directsound -> available with DirectX (Win9x to Win10) and SDL1/2, usually good for almost all windows versions. 3) XAudio2 -> With WinXP+ and SDL2.07 and below, so consider it dead. It was usually the best under XP/Vista. 4) WASAPI -> With Win7+ and with SDL2.06 and later. It is usually the best for Win7/8.x/10

The last is the "preferred" case on all modern windows because it is the most native way to play sounds. I know this because I had a ton of problems with sounds on several machines with Win7-10 and even on the old XP.

Sometime it will not work as expected, in this case it can be good to use the SDL_AUDIODRIVER environment variable to specify a preferred audio driver. values are: winmm, directsound, and wasapi When you are forced to use winmm (rarely), I observed that the snd_maxslicetime_ms option has to be set to at leas 48 in the crispy-doom.cfg

The biggest problem I had was with a SDL2 is build only with XAudio2+winmm and using Win7/8/10. From my experience XAudio2 works very bad on those OSes, but this should no more be a problem with recent SDL2.dll. Also, even if directsound is deprecated it works quite nice in general, probably because it has been very widely used in the past.