-
Notifications
You must be signed in to change notification settings - Fork 521
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 support #62
Comments
First off, I should mention I'm not too familiar with EAX itself. I've played around a little with EAX 2.0 that offers a single reverb effect with tweakable parameters, but hardware accelerated audio and EAX was already on the way out by the time I got into 3D audio programming. That said, yes, EAX can be routed to EFX. EFX was designed by the same company to be a more OpenAL-like API for the same hardware functionality, since EAX was designed for DirectSound which no longer had hardware acceleration with Windows Vista. Creative tacked on an EAX extension in their OpenAL driver to expose their hardware capabilities for early OpenAL adopters. However, since the EFX API was developed, it's the preferred method of doing environmental audio, with EAX left for compatibility with those old apps. OpenAL Soft never supported the EAX extension, since it began development with code that didn't include any environmental audio processing -- just the standard doppler shift, 3D panning, and distance/cone attenuation, over stereo output. The environmental audio had to be coded independently, and the EFX API had been designed by that time with easy-access documentation, whereas EAX docs were difficult to find. And since EAX relies on Windows-specific types (GUIDs), I decided to only worry about EFX which was platform-agnostic and the way forward for apps doing environmental audio on OpenAL. As far as I'm aware, EFX is capable of handling up to at least the EAX 5.0 feature set. Though EFX is a bit modular, so an implementation may not have everything. For instance, you may only have a single (parameterized) I3DL2 reverb effect with per-source low-pass filters, or you may have multiple, more featured, "eax reverb" effects with per-source low-, high-, and band-pass filters, along with chorus, distortion, equalizer, and other effects. As of 1.17.2, OpenAL Soft supports most of what the EFX API defines, with up to four simultaneous effects, missing only the frequency shifter, pitch shifter (where it alters the pitch but keeps the same speed of playback), vocal morpher, and autowah effects. Consequently, OpenAL Soft with EFX can do smooth transitions between reverb zones. You can have multiple "eax reverb" effects defined, one per nearby zone which can be panned in the direction of its aperture relative to the listener. Then as you get closer and enter the zone, it envelopes the listener as the "old" zone starts panning back toward the area you came from. Each source can feed each effect depending on how much it reaches the zone (i.e. a source inside the zone can feed it fully, while a source that's completely blocked from it can avoid feeding it at all, and a source that's only partially blocked from it can partially feed it). |
Ah, thanks for such an informative reply! That makes a lot of things much clearer.
|
I3DL2 reverb isn't really capable of smooth zone transitions since it lacks the panning properties of the more advanced "eax reverb" effect. Such an old title like Unreal 1 probably didn't even support multiple simultaneous effects. If support is added for the EAX extension, games that used EAX 3 through OpenAL would likely still be able to do the same things it could. |
All right, thanks for the information. That explains why there's no occlusion and smooth transitions in Unreal despite it using EFX, since there's most likely no code for doing line of sight checks whatsoever in the base game, it would need to be coded separately. But good to know it's doable. It would be nice to keep this issue around as a tracker for whenever anyone attempts to implement such an EAX to EFX call translation layer. |
does this means that OpenAL Soft 1.18.2 does not support EAX? i tried it in STALKER and the console says EAX extensions are not found. |
Yes, it does mean it. |
At the very least maintaining support for devices that already feature EAX support would be appreciated, as that is basically the only thing preventing me from moving (system-level) from Creative OAL to OALSoft. As an example, here's oalinfo64 with my Sound Blaster X7 with Creative's OAL
vs latest OALSoft
|
OpenAL Soft can't use the hardware's capabilities since the mix is already done before it ever gets to the sound device, so a device supporting EAX is irrelevant to OpenAL Soft supporting it. The issue isn't really the capability anyway; OpenAL Soft's effect and filter implementations can handle what EAX needs. The problem is implementing EAX's functions so that they use OpenAL Soft's effects and filters properly, and without causing unnecessary load for apps that don't use EAX. |
How do they do it here then? Is XA2 so conceptually different?
Fun fact: all post X-Fi soundblasters (or post EMU**** if you prefer) actually are doing all of this in-software. |
That seems to intercept the XA2 calls, allowing it to hook their own (software/XAPO) filters on certain sounds. It doesn't seem to be using hardware.
Likely, either that or some part of the app or driver talked to eax.dll for some extra information for the driver to use.
Wouldn't be surprised. Presuming you have the processing power, it's generally easier to just write the code (or use preexisting code) to run in software than to also design or use specialized hardware to get the same task done. Creative had a habit of buying out potential competition and using the tech as their own, so using Sensaura's OpenAL on their software-based sound cards seems logical. |
Yes, of course. But my point was about the potential being there (not that you'd want much in this day and age, but still) |
That does look interesting. How well does it sound with Doom 3/Quake 4 and other OpenAL+EAX apps compared to real hardware? Quake 4 in particular had significant problems when used through DSOAL, though it's difficult to tell if it's a problem with OpenAL Soft's effects, wrap_oal's OpenAL+EAX -> DSound+EAX wrapper, DSOAL's DSound+EAX -> OpenAL+EFX wrapper, or something else acting up. |
I don't own appropriate hardware, so it's unknown to me. id Tech 4 based games definitely has some "out of range" bugs.
|
Added support for EAX 2.0-5.0 and X-RAM extensions (#632). |
Hello, Does that means that EAX 4.0 version of Doom 3 ROE is completely Bugged, no matter what you do ? |
Doom is allegedly a particularly troubled game. |
Added patch to fix "air absorption hf" issue in Doom 3 ROE. What are other issues in ROE except the problem "air absorption hf"? |
Hello, I just made a retry with fix" EFX files, It work now, I have probably put them in a wrong place the first time during my test, so adding the missing line fix the EAX issue between zone, before that eax effect were stuck after the first zone change. I also try with your tool (vanilla game), it also fix the problem on ROE. I don't know which solution is better, probably replacing the wrong efx file instead of reseting value everytime as the base game do not have any problem (but I don't know if your tool could have negative impact on it). |
Handling of EFX files in the engine done while loading the level. |
I hope the fix solves your problem, but what does it mean that "the reverb effect are all wrong"? I have recently played Doom 3 RoE with X-Fi and have not noticed anything, what exact problem do you notice? Maybe I was not paying attention 😆 |
This issue only occurs if you enable EAX4.0, for example in EREBUS4 map, you begin in a small airlock, the sound is muffled due to the size of the room, then you enter in a corridor the sound will have echo due to the size of the room, if you return to the airlock, the game will keep the effect of the large room (echo etc;..), especially noticable with the PNJ Voice. With fix EFX files or the patcher, the effect change everytime you enter a new zone. I do not have pci slot to test with my old X-fi, so perhaps old creative card (audigy 2 / X-fi) have some kind of fix inside their openAl drivers (ct_oal.dll). If you want to test just type in the console "map game\erebus4" in the DOOM3 ROE menu. |
You are describing the problem which happens when reverb properties are not initialized. Now what happens when you enter into different "audio zone" on level, if one of the reverb property in the zone is out of range:
|
You mean this? |
On your video it look like you do not have the problem, but it's very short, perhaps if you could move a little more in the room until the pnj speak and came back to the airlock, it would be more obvious. |
I can't make videos larger than 23mb. I forgot to mention that I recorded the game with the X-Fi Titanium HD (ct_oal). |
Link to video with bugged EAX Do you have the same bahaviour with a X-fi card ? |
If I understand correctly, there is a bug with EAX effects with Doom 3 RoE. The X-Fi OpenAL driver apparently fixes this, Host OpenAL doesn't. |
Correct you do not have the bug in your video. |
It does not. |
I didn't mean that the X-Fi drivers fix the bug, I meant that with the X-Fi, the game works fine even if the bug is still there (in the video I uploaded, the game works fine and I didn't apply any fixes ). |
It's an intermittent/random bug. It depends on the contents of dirty memory, so it can seem to work just fine for a long time for some people, and be a regular problem for others, depending on a whole host of otherwise unrelated factors. |
I haven't found a definitive answer to whether, and to what extent, OpenAL Soft supports EAX. I take it that it doesn't support it natively, but it does support EFX, and EAX calls could generally be routed to EFX calls. Is that something that already exists, or is planned?
Another issue is how advanced the EFX implementation is compared to EAX levels. For instance, is there support for smooth transitions between zones (a la EAX 3)?
The text was updated successfully, but these errors were encountered: