kcat / dsoal

A DirectSound DLL replacer that enables surround sound, HRTF, and EAX support via OpenAL Soft
GNU Lesser General Public License v2.1
392 stars 50 forks source link

Call of Duty #62

Open UserGit-2021 opened 2 years ago

UserGit-2021 commented 2 years ago

The audio is great as usual, but there are some pressing issues. Notably, the EAX implementation is really poor. Reverb gets defined for one area and then lasts the entire level until a new EAX zone is defined. Another problem is that occasionally, random sounds will glitch and play at full volume, which is noticeable during the shellshock sequence in Stalingrad https://youtu.be/G_PBzIAFY_8?t=171

With ALchemy Creative Has no problem https://drive.google.com/file/d/1GTp07ONamUqSaiNmVaOI-_2iAS89LybK/view?usp=sharing

UserGit-2021 commented 2 years ago

dsoal_error.zip Log

kcat commented 2 years ago

Not sure about the reverb not updating, but I am noticing things like this in the log:

1b00:warn:dsound:DSBuffer_SetVolume Invalid volume (-11457)

I see it sometimes using various values less than -10000, which is supposed to be the minimum volume level. It seems the game's calculating distance attenuation manually since it also sets the min and max distance to the same value, preventing it from attenuating automatically while continually adjjusting the volume. I wonder if DSound accepts values less than -10000, clamping it or taking it as is (what GetVolume reports if the SetVolume should succeed with lesser values).

Kappa971 commented 2 years ago

After Max Payne, another game where there is a bug due to bad programming. As a non-programmer, I ask myself:

  1. Did Microsoft and Creative offer the necessary documentation to developers, or were they forced to work without knowing exactly what they were doing?
  2. If Max Payne, Call of Duty or other games behave in an undocumented way or have weird bugs, how is it possible that they work correctly with Creative drivers, with ALchemy, etc? Did the developers misprogram their games and did Creative "hack" the drivers to make them work right?
mirh commented 2 years ago

Cod uses miles, which is yet an extra layer of abstraction (there's even legend that you can update mss32.dll and m3d files to fix certain issues). Then AFAIU it was a fairly well sponsored game by creative (so it doesn't have the FEAR's dubbing team excuse) but still, you can only catch the bugs the implementation you use passes through.

kcat commented 1 year ago

Does the latest commits help (or worsen it)? You need the latest OpenAL Soft Git along with the latest DSOAL Git, as there's been changes to both that can influence EAX behavior.

UserGit-2021 commented 1 year ago

Does the latest commits help (or worsen it)? You need the latest OpenAL Soft Git along with the latest DSOAL Git, as there's been changes to both that can influence EAX behavior.

Does not help. alsoft_error.txt dsoal_error.txt alsoft.txt https://youtu.be/9ER0l3H8YrQ

kcat commented 1 year ago

It doesn't help with the reverb not changing in a level, either? The DSOAL log shows it continually setting the EAX environment throughout play, though I don't see what environment it's setting (it's probably just setting the environment every update, with the player/camera position dictating which environment to use).

And this is unrelated to the issue here, but I notice your alsoft config is setting channels=stereo, stereo-mode=headphones, and hrtf=false. That's forcing HRTF off, even though headphones would want it. You're setting stereo when the device is configured for 7.1 too, so you only get a stereo mix instead of the 7.1 surround sound you should get. This makes it seem like you have headphones that you want OpenAL to treat as stereo headphones, but the system has them configured for virtual surround sound so it actually behaves like speakers, making OpenAL Soft do a stereo mix on virtual speakers instead of a 7.1 mix the device wants.

UserGit-2021 commented 1 year ago

It doesn't help with the reverb not changing in a level, either? The DSOAL log shows it continually setting the EAX environment throughout play, though I don't see what environment it's setting (it's probably just setting the environment every update, with the player/camera position dictating which environment to use).

And this is unrelated to the issue here, but I notice your alsoft config is setting channels=stereo, stereo-mode=headphones, and hrtf=false. That's forcing HRTF off, even though headphones would want it. You're setting stereo when the device is configured for 7.1 too, so you only get a stereo mix instead of the 7.1 surround sound you should get. This makes it seem like you have headphones that you want OpenAL to treat as stereo headphones, but the system has them configured for virtual surround sound so it actually behaves like speakers, making OpenAL Soft do a stereo mix on virtual speakers instead of a 7.1 mix the device wants.

Clicks are heard when using DSOAL. There are no clicks when using ALchemy.

Enabled hrtf=true, clicks are also present. Although I did not understand, I still turned it on just in case.