Fix plEAXListenerMod.h to be includable from outside libHSPlasma itself#284
Merged
zrax merged 1 commit intoH-uru:masterfrom Mar 29, 2024
Merged
Conversation
Member
|
This would help for a branch I have in progress for adding the EAXListener modifiers to PlasmaShop, for which I had to add the full EFXUtil.h in order to have access to the necessary structures. Frustratingly, the lack of a complete header in Plasma is the major remaining blocker in completing Plasma#1000, as the required structures only exist in one of OpenAL's internal headers and it isn't a public interface (even though it originally was as part of EAX), and I don't want to copy the file wholesale into our repo. Deciding how to handle this has prevented me from finishing the otherwise-complete work. |
zrax
approved these changes
Mar 29, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The header PRP/Audio/plEAXListenerMod.h included an EFX header from 3rdPartyLibs, which isn't part of the public libHSPlasma headers that get installed into the prefix. This made it impossible for downstream projects (e. g. PlasmaShop) to use plEAXListenerMod.h, because the required EFX header is only accessible within libHSPlasma itself.
This PR solves the issue by adding a new header plEAXStructures.h, which contains a copy of the few EAX structures needed by plEAXListenerMod.h. (This is intentionally similar to plEAXStructures.h in H-uru/Plasma.) This header doesn't depend on the OpenAL/EFX headers and can thus be included by downstream projects, but the definitions are compatible with the real OpenAL/EFX headers, so it should be safe to include both at once.
Though I wonder if libHSPlasma needs to use the real OpenAL headers at all. libHSPlasma doesn't actually use the OpenAL API - it only needs a couple of EAX structure definitions and some constants. Those could be easily replicated in a custom header, perhaps with the names changed to avoid any possible conflicts with the real OpenAL headers.