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

Fix plEAXListenerMod.h to be includable from outside libHSPlasma itself #284

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

dgelessus
Copy link
Contributor

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.

@Deledrius
Copy link
Member

Deledrius commented Mar 28, 2024

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 zrax merged commit c7ee59a into H-uru:master Mar 29, 2024
8 checks passed
@dgelessus dgelessus deleted the make_pleaxlistenermod_h_includable branch March 29, 2024 00:14
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

Successfully merging this pull request may close these issues.

3 participants