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

EAX Regression with v1.24 #1106

Open
TyrannoWright opened this issue Feb 3, 2025 · 8 comments
Open

EAX Regression with v1.24 #1106

TyrannoWright opened this issue Feb 3, 2025 · 8 comments

Comments

@TyrannoWright
Copy link

During my annual playthrough of F.E.A.R. with DSOAL, I've noticed that the game is missing certain effects like occlusion or reflections, no matter whether 2.0 or 4.0 are used alone. The longer the gameplay goes also seems bring up cut-out audio and gets worse with both 2.0 and 4.0 used. I made sure it wasn't dsound.dll itself, but after testing various versions with dsoal-aldrv.dll I noticed the issues after the rewrite from v1.23.1. Cutouts were still persisting, but not as frequent.

alsoft_log.txt
dsoal_log.txt (For extra details.)

@kcat
Copy link
Owner

kcat commented Feb 4, 2025

The longer the gameplay goes also seems bring up cut-out audio

Do you mean all audio temporarily drops out then comes back, i.e. is choppy, rather than certain sounds simply stopping early or not playing? If the sound is choppy, that may indicate a performance problem, with OpenAL Soft not having enough time to process and mix all the sounds and effects before the device underruns. HRTF would be the usual suspect for that, but it seems you have 7.1 output instead, so OpenAL Soft isn't doing costly HRTF. Excessively high sample rates would be another suspect, but it looks like you have a perfectly normal 48khz set.

In the DSOAL log, I do notice a lot of

err:dsound:Out of hardware sources

and

warn:dsound:Buffer::Initialize Can't create multi-channel 3D buffers

which is preventing some sounds from playing. The latter is completely the fault of the game, specifying DSBCAPS_CTRL3D for a non-mono sound, which is expressly disallowed with DSound8. The former is likely a problem with the game, trying to use too many hardware buffers at once, unless there's some issue with DSOAL not releasing hardware buffers/resources when it's supposed to (though there's nothing in the log that looks wrong, and it is still able to play hardware 3D sounds in between not being able to, so it is releasing hardware buffers in between sounds it can't play). There's nothing wrong on OpenAL Soft's side there, in either case.

As for missing occlusion and reflection, there's nothing in the logs indicating a problem with them. If anything, OpenAL Soft 1.24.2 should make reflections/reverb a very tiny bit louder, while there was a change to occlusion to make it less pronounced (which was to fix it being too strong in other apps and bring it in line with the specification, but should still be audible regardless). If they're completely missing, the problem is likely somewhere else other than the effects themselves.

An updated DSOAL log may help. Using a newer Git build and setting DSOAL_LOGLEVEL to 4 instead of 3 will provide more information.

@TyrannoWright
Copy link
Author

TyrannoWright commented Feb 4, 2025

Tried again with r676 on 3 levels. Seemed to be working...? At least till I used a 4GB exe patch.
This log's for the patched version.
dsoal_log.txt
I'm also unsure of how to switch logging, so forgive me if this isn't the right mode.

@kcat
Copy link
Owner

kcat commented Feb 4, 2025

Tried again with r676 on 3 levels. Seemed to be working...? At least till I used a 4GB exe patch.
This log's for the patched version.

And when you applied the 4GB patch, you mean occlusion and reflections stopped working, and sounds stopped playing again after a while during play? Did the missing sounds occur when playing and generating the log? This log doesn't seem to have any messages about running out of hardware sources or trying to create 3D buffers with multi-channel sounds, though it also seems to be a much shorter log than the last one.

Though given that the effects worked originally until the 4GB patch was applied, that would suggest the game's not completely okay with it. Perhaps some stuff's getting allocated in the >2GB range and either it gets confused with having the sign bit on when interpreting pointers as integers, or it's allocating more memory than it expects to which is confusing some internal memory management logic. FWIW, all pointers I notice in the log are under the original 2GB limit, with the highest being

3124:trace:dsound:DirectSoundCreate ({null}, 0x18032a94, 0x0)

where it's an out pointer for the IDirectSound* handle. Though the log doesn't show everything, it's possible some other calls are dealing with higher pointer values, but even if not, that doesn't mean there isn't some problem in the engine that has nothing to do with DSound/DSOAL.

I'm also unsure of how to switch logging, so forgive me if this isn't the right mode.

How did you create this log? Something is setting DSOAL_LOGLEVEL=3, it's just a matter of finding that and changing the 3 to 4 (which will create a much bigger, but more informative, log file).

@TyrannoWright
Copy link
Author

TyrannoWright commented Feb 4, 2025

I tried to match a batch file with the follow:

set DSOAL_LOGLEVEL=4
set DSOAL_LOGFILE="1_dsoal_log.txt"
fear.exe

All it seemed to do was spawn a "myeasylog.txt" file that seems to write irrelevant code. The log I try to write also don't show.
Steamless was required to run the game from the .exe directly.

@TyrannoWright
Copy link
Author

Here's full proper logs after finding a better method and some option changes.

alsoft_error.txt
DSOAL log: https://www.dropbox.com/scl/fi/x271ldylck55kcjidihlg/dsoal_error.txt?rlkey=s8z47bfl0m3gucdgubtqiumfq&st=sa0j32w0&dl=0

@kcat
Copy link
Owner

kcat commented Feb 12, 2025

Nothing seems wrong in the logs. DSOAL is showing EAX4 properties are continually being set, for both sources and fxslots, and it sets the context's primary fx slot. If these are with the 4GB patch applied and the effects not being audible, that would suggest there's a problem with the game when it has more than 2GB available causing it to pass EAX properties resulting in no audible effects. Or there's something wrong with DSOAL or OpenAL Soft when the process is 4GB-enabled, but I'd expect the problem to be more wide-spread if that was the case (many apps are 4GB-enabled at build time).

@TyrannoWright
Copy link
Author

TyrannoWright commented Feb 12, 2025

The log is without the 4GB patch and I've tried different EAX versions on and off. The missing buffers issue however is not noticeable anymore. So there's other factors at play with occlusion barely working. Steamless perhaps since it's the other thing I've used that modifies the .exe file?

@mirh
Copy link

mirh commented Feb 12, 2025

I don't really think that's relevant, but anyway you don't need it to set environment variables.
Aside of the windows control panel, you can also use the command line parameter options in steam.

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

3 participants