-
Notifications
You must be signed in to change notification settings - Fork 545
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] Reverb regression (commit d21ff67) #725
Comments
Looks like there's a couple things here. First, it seems when an EAX call is made, all existing sources are initialized with the default properties for the EAX version of the call (even if the call wasn't for a source), then they continue to use that version's properties until the source has an EAX property set which changes that individual source. Second, any sources made after an EAX call will be initialized with the default properties for the EAX version of the last EAX call. So if you generate some sources, query an EAX4 context property, query an EAX5 context property, then generate some more sources, the first set will be using EAX4 default parameters and the second set will be using EAX5 default parameters, even though no EAX calls are made on the sources themselves. However, this alone wouldn't be too much of an issue, as the only difference in source defaults is EAX4's active slots being It could be that these different 3D/2D defaults are just API side for what the developer wants to use a source for and don't represent the actual EAX5 defaults for a source. Or it could be there's some point where a source's EAX properties are reset and a default used depending on its current buffer format. But that would need testing with actual hardware. All that said, it seems there was a bug hiding a bug(?) in versions prior to that commit, where the source was being initialized with the "3D" EAX5 defaults, but the Unless hardware shows something different (like setting a source's buffer resets the source's EAX properties, or multi-channel sources don't have EAX applied regardless of the set properties, or if the game uses EAX5, the default active fx slots for EAX5 should be null), I think the source should be initialized with no active fx slots enabled separate from any version's defaults, until the app sets a source EAX property. A similar thing should probably be done with effects, to not have any effect set on the fx slot until the app sets an fx slot property (which would avoid having reverb+chorus running on an app that just queried EAX support but doesn't end up using it). |
Thanks @kcat for the detailed explanation. |
Actually I noticed something else. A source will always have the context's primary fx slot active, even if the source isn't set to use the primary fx slot. So that means with EAX4/5, all sources will always have fx slot 0 enabled (or whatever is set for the primary fx slot), even if the app sets null fx slots on the source. |
Try now with commit e2f5ceb. |
Thanks @kcat, now the reverb is no longer applied in the radio dialogue. |
I think that should be it, if there's no other issue occurring here. |
Well, if I notice any other problems, I will report them. Thank you |
This isn't inherent to the commit specified here, but playing Prey (2006) with OpenAL Soft you will notice a very heavy reverb effect in levels that with X-Fi and Host OpenAL (Creative) the reverb is very mild. The game uses EAX 5, maybe there is some hidden bug? Or is it about the different reverb management of OpenAL Soft (as mentioned in another discussion)? |
Doom 3 and Unreal 2 utilizes only one FX slot. While working on #705 and #720 I seen some issues with filters and using FX slots in comparison to EAX4 docs (I have to admit, only after EAX extention was integrated into OpenAL Soft, I noticed links to EAX4 docs on the wiki). I decided to postpone resolving those issues until I'll complete with states for each version: for FX slots (almost finished) and the context (yet to be done). |
With the latest version of OpenAL Soft, Prey (I only tried Prey) is still "broken" but in a different way than before. There is no longer the extreme reverb, but the change between different "environments" is not smooth but too fast (with a possible static noise, but this happened even before). I recommend, if you don't already have it, to retrieve a copy of Prey (2006) because I think it is an excellent benchmark for EAX (5.0). |
OpenAL Soft doesn't interpolate between reverbs as well as I'd like. Some filters don't interpolate at all (which can cause clicks in some circumstances), while what does interpolate happens over the course of the update. When listening to hardware, it sounds as if it actually runs a second reverb when it switches presets, letting the original decay naturally with its old properties at the same time that a new one starts with the updated properties. But I'm not sure how that's supposed to work efficiently with the app providing continuous updates for dynamic environment modeling, as it would cause/require a lot of overlapping reverbs running in parallel to avoid audible drop-outs. The Effects Extension Guide for OpenAL/EFX mentions the early reflections and late reverb delay, panning, and gain properties can be updated relatively frequently (25 to 30 times per second, the same rate most source/listener properties should be updated), while others should be less frequent (10 to 15 times per second), indicating changes to the reflection/reverb properties can more simply interpolate the existing effect while the other properties do some more intensive change. But even at that reduced rate, a completely separate parallel process would still need a lot of overlapping instances given how long the reverb tail can be. |
Do you have a saved game to test the issue? |
This makes the audio in games a bit "broken" because there is a quick change of effects from one room to another with often an audible click.
I have the full 132mb game save, it won't let me load it. However, it doesn't take more than 10 minutes to get to level 2. Anyway, this is the problem I'm talking about:
|
You don't have to provide all saved games, just only one with problematic level is enough.
Now this is explains why the wrapper had problems with EAX call pattern in Mass Effect (2007):
|
These two videos show where it happens (Level 02: Downward Spiral): #725 (comment) EDIT |
Hi @bibendovsky, did you then take a look at Prey? |
Sorry, not yet. |
Hi, the commit d21ff67 caused a regression in the reverb effect.
For example in Splinter Cell, from this commit onwards, reverb is also applied in radio dialogues, so the reverb is applied where it shouldn't.
I haven't tested other games, but the issue looks like this: kcat/dsoal#46
The text was updated successfully, but these errors were encountered: