diff options
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r-- | alc/alc.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index d6bd005f..6358ad8b 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -452,6 +452,13 @@ const struct { DECL(alAuxiliaryEffectSlotPlayvSOFT), DECL(alAuxiliaryEffectSlotStopSOFT), DECL(alAuxiliaryEffectSlotStopvSOFT), +#ifdef ALSOFT_EAX +}, eaxFunctions[] = { + DECL(EAXGet), + DECL(EAXSet), + DECL(EAXGetBufferMode), + DECL(EAXSetBufferMode), +#endif }; #undef DECL @@ -882,6 +889,7 @@ constexpr struct { DECL(AL_STOP_SOURCES_ON_DISCONNECT_SOFT), #ifdef ALSOFT_EAX +}, eaxEnumerations[] = { DECL(AL_EAX_RAM_SIZE), DECL(AL_EAX_RAM_FREE), DECL(AL_STORAGE_AUTOMATIC), @@ -2943,15 +2951,23 @@ START_API_FUNC { DeviceRef dev{VerifyDevice(device)}; alcSetError(dev.get(), ALC_INVALID_VALUE); + return nullptr; } - else +#ifdef ALSOFT_EAX + if(eax_g_is_enabled) { - for(const auto &func : alcFunctions) + for(const auto &func : eaxFunctions) { if(strcmp(func.funcName, funcName) == 0) return func.address; } } +#endif + for(const auto &func : alcFunctions) + { + if(strcmp(func.funcName, funcName) == 0) + return func.address; + } return nullptr; } END_API_FUNC @@ -2964,15 +2980,23 @@ START_API_FUNC { DeviceRef dev{VerifyDevice(device)}; alcSetError(dev.get(), ALC_INVALID_VALUE); + return 0; } - else +#ifdef ALSOFT_EAX + if(eax_g_is_enabled) { - for(const auto &enm : alcEnumerations) + for(const auto &enm : eaxEnumerations) { if(strcmp(enm.enumName, enumName) == 0) return enm.value; } } +#endif + for(const auto &enm : alcEnumerations) + { + if(strcmp(enm.enumName, enumName) == 0) + return enm.value; + } return 0; } |