Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grand Prix 4 - EAX broken (Environment Diffusion and Air Absorbtion HF out of range) #97

Open
ThreeDeeJay opened this issue Oct 27, 2023 · 10 comments

Comments

@ThreeDeeJay
Copy link

Follow-up on report here: multitheftauto/mtasa-blue#2687 (comment)
tl;dr This game was reported to have broken EAX while in multiplayer, though at least on my end it had nothing to do with dsound.dll not being loaded, but EAX just failing (3D HRTF still works and I made sure EAX was enabled). This seems to be the relevant error in alsoft_error.txt, which seems related to #82:

[ALSOFT] (EE) EAXSetDirect [EAX_REVERB_EFFECT] Environment Diffusion out of range (value: 100.000000; min: 0.000000; max: 1.000000).
[ALSOFT] (EE) EAXSetDirect [EAX_REVERB_EFFECT] Air Absorbtion HF out of range (value: 100.000000; min: -100.000000; max: 0.000000).

The weird thing is that these lines get repeated non-stop in single player, yet EAX still works; and only a few times in multiplayer, where EAX doesn't work.

Multiplayer:
Demo: https://youtu.be/RBO6VcmMx-0
GP4_Multiplayer_DSOAL_logs.zip

Single player:
Demo: https://youtu.be/S05Uxm8L5Zo
GP4_Singleplayer_DSOAL_logs.zip

@ThreeDeeJay
Copy link
Author

On a side note, EAX is also broken in multiplayer with ALchemy: https://youtu.be/Wxl485GYRSU

@kcat
Copy link
Owner

kcat commented Oct 27, 2023

The weird thing is that these lines get repeated non-stop in single player, yet EAX still works; and only a few times in multiplayer, where EAX doesn't work.
[...]
On a side note, EAX is also broken in multiplayer with ALchemy

That makes me think the errors are expected (that they happen and get ignored with native too) and its unrelated to the lack of reverb in multiplayer. It seems that in single player, the game keeps updating EAX properties anyway with those faulty properties, so the other relevant properties are still set correctly, while in multiplayer, something makes it stop updating reverb at some point and it stays with an inaudible reverb.

Looking at the logs, it does look like the game continues to set the EAX buffer properties for played sounds, it just stops setting the EAX listener/reverb properties in multiplayer for no apparent reason.

@ThreeDeeJay
Copy link
Author

So should we consider this to be just a poor EAX implementation that requires a fix outside of DSOAL's scope?
or do you think this is worth inspecting more closely to see if it can be fixed in DSOAL?
If this really is related to #82, maybe the issue isn't so uncommon and a fix would also fix other games 🤔
By the way, I can also test it on Windows XP with X-Fi hardware if that helps

@kcat
Copy link
Owner

kcat commented Oct 27, 2023

So should we consider this to be just a poor EAX implementation that requires a fix outside of DSOAL's scope?
or do you think this is worth inspecting more closely to see if it can be fixed in DSOAL?

It may be worth inspecting to see if there's an easy workaround on DSOAL's side, though there might not be anything DSOAL itself can do and it needs an exe patch.

If this really is related to #82, maybe the issue isn't so uncommon and a fix would also fix other games 🤔

I don't think that's related, since it's also affecting ALchemy. That issue is that the game tries and fails to set a few reverb properties before loading into the level from the main menu, which causes OpenAL Soft to have no EAX reverb running until a property is set successfully after moving to another map, while ALchemy and native hardware have the Generic reverb preset running by default. In this game, some properties are successfully set alongside those errors, but those properties are for a silent (or very very subtle) reverb, and they're never changed again in multiplayer.

By the way, I can also test it on Windows XP with X-Fi hardware if that helps

That could be useful to figure out if it ever worked or not. For all I know, the devs may have purposely disabled reverb during multiplayer races, thinking it was a bit too distracting if players were also expected to talk to each other or play nearby each other.

@gp4wonder
Copy link

Guys thank you so much for this, I just did a search on github dsaol gp4 and just saw this new post, if there is anything you need from my end please let me know.

@gp4wonder
Copy link

gp4wonder commented Oct 28, 2023

gp4network.zip

i ran wireshark packet analyzer since this is affecting multiplayer only, the attachments is from one of the machines. I did run it on both at the sametime, the above is from 192.168.0.38. The other machine was 192.168.0.140

@mirh
Copy link

mirh commented Oct 28, 2023

Network activity has nothing to do with audio?

@ThreeDeeJay
Copy link
Author

It may be worth inspecting to see if there's an easy workaround on DSOAL's side, though there might not be anything DSOAL itself can do and it needs an exe patch.

If someone finds what needs to be patched, maybe @gp4wonder could suggest it to the GPxPatch if that's still in development.
It already applies some patches (on the fly, without modifying the executable), including some related to 3D sounds.

That could be useful to figure out if it ever worked or not. For all I know, the devs may have purposely disabled reverb during multiplayer races, thinking it was a bit too distracting if players were also expected to talk to each other or play nearby each other.

Results are in: pretty much the same as DSOAL and ALchemy, except in multiplayer the game hangs momentarily at times where I think it's entering/exiting EAX reverb zones.

Single player: https://youtu.be/bBP9Do-RMKY
Multiplayer: https://youtu.be/krtZDGj8LxI

@gp4wonder
Copy link

@3DJ awesome work mate, thank you so much.
I'll get intouch with gpxpatch

GPxPatch version 4.52
Copyright (c) 2001-2019 René Smit
GPxSAT Classic and Digital copyright (c) 2001-2004 Marc Aarts
GPxSAT Digital 2004 copyright (c) Markus Krötz
Lo2k Blue Theme panel copyright (c) 2004 Laurent Rousseau
All rights reserved.

Contact and updates
All bug reports, complaints and suggestions should be sent to: [email protected]
The latest version can be retrieved from: http://rsdi.home.xs4all.nl/

@gp4wonder
Copy link

[www.sdidit.nl]
Issue Tracker
Bug reports and feature requests can be entered in the issue tracker. Please follow the rules on the Create issue page.

Issue #233 SUBMITTED
[bitbucket.org]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants