Skip to content

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

Merged
zrax merged 1 commit intoH-uru:masterfrom
dgelessus:make_pleaxlistenermod_h_includable
Mar 29, 2024
Merged

Fix plEAXListenerMod.h to be includable from outside libHSPlasma itself#284
zrax merged 1 commit intoH-uru:masterfrom
dgelessus:make_pleaxlistenermod_h_includable

Conversation

@dgelessus
Copy link
Copy Markdown
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
Copy Markdown
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
@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