Open sergeyext opened 1 month ago
@gabeklavans would you be able to take a look?
To be clear the problem here is that we do not define AL_DIRECT_CHANNELS_SOFT
after cf8a0d0?
Sounds like a good point. I didn't consider that all macros would still need to be present in order to check if the extension is enabled on the system.
The total of possible extensions is a moving target, so it may not be feasible to get all of them in and keep them up to date, but I can definitely just throw a bunch in there, including the one you're missing.
I'd hope that openal will correctly report that the extensions that haven't been implemented in emscripten are in fact not present, but I admit I'm not aware of the internals of openal to know if this is the case. I hope adding these macros for unsupported extension names doesn't break things in that way!
OpenAL does not require all extensions to work and provides
alIsExtensionPresent
to check if an extension works. My codebase (and I suppose many others) handles this situation likeThis code fails to compile with emscripten after cf8a0d0 and requires additional macros to fix. On the other hand, if you unconditionlessly call
alSourcei(id, AL_DIRECT_CHANNELS_SOFT, AL_TRUE);
, it will raise an AL_INVALID_ENUM error on a platform with no such extension, which is expected behavior.I would like to suggest adding macros of unsupported extensions for compatibility with native code.