diff options
author | Chris Robinson <[email protected]> | 2021-01-27 21:24:03 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-01-27 21:24:03 -0800 |
commit | 27e8807a5b9ff1ced122834d70ea6612060d2cf1 (patch) | |
tree | 828bbd16ef59f91d2a29620ac5bd134969c8a47a /router | |
parent | 8c2592b4d9604d2c47120fdc7f773c22ed92af16 (diff) |
Export EFX functions from the router
Diffstat (limited to 'router')
-rw-r--r-- | router/al.cpp | 36 | ||||
-rw-r--r-- | router/alc.cpp | 36 | ||||
-rw-r--r-- | router/router.cpp | 36 | ||||
-rw-r--r-- | router/router.h | 34 |
4 files changed, 141 insertions, 1 deletions
diff --git a/router/al.cpp b/router/al.cpp index 4c8b0006..5e273236 100644 --- a/router/al.cpp +++ b/router/al.cpp @@ -130,3 +130,39 @@ DECL_THUNK3(void, alGetBufferi, ALuint, ALenum, ALint*) DECL_THUNK5(void, alGetBuffer3i, ALuint, ALenum, ALint*, ALint*, ALint*) DECL_THUNK3(void, alGetBufferiv, ALuint, ALenum, ALint*) DECL_THUNK5(void, alBufferData, ALuint, ALenum, const ALvoid*, ALsizei, ALsizei) + +DECL_THUNK2(void, alGenFilters, ALsizei, ALuint*) +DECL_THUNK2(void, alDeleteFilters, ALsizei, const ALuint*) +DECL_THUNK1(ALboolean, alIsFilter, ALuint) +DECL_THUNK3(void, alFilterf, ALuint, ALenum, ALfloat) +DECL_THUNK3(void, alFilterfv, ALuint, ALenum, const ALfloat*) +DECL_THUNK3(void, alFilteri, ALuint, ALenum, ALint) +DECL_THUNK3(void, alFilteriv, ALuint, ALenum, const ALint*) +DECL_THUNK3(void, alGetFilterf, ALuint, ALenum, ALfloat*) +DECL_THUNK3(void, alGetFilterfv, ALuint, ALenum, ALfloat*) +DECL_THUNK3(void, alGetFilteri, ALuint, ALenum, ALint*) +DECL_THUNK3(void, alGetFilteriv, ALuint, ALenum, ALint*) + +DECL_THUNK2(void, alGenEffects, ALsizei, ALuint*) +DECL_THUNK2(void, alDeleteEffects, ALsizei, const ALuint*) +DECL_THUNK1(ALboolean, alIsEffect, ALuint) +DECL_THUNK3(void, alEffectf, ALuint, ALenum, ALfloat) +DECL_THUNK3(void, alEffectfv, ALuint, ALenum, const ALfloat*) +DECL_THUNK3(void, alEffecti, ALuint, ALenum, ALint) +DECL_THUNK3(void, alEffectiv, ALuint, ALenum, const ALint*) +DECL_THUNK3(void, alGetEffectf, ALuint, ALenum, ALfloat*) +DECL_THUNK3(void, alGetEffectfv, ALuint, ALenum, ALfloat*) +DECL_THUNK3(void, alGetEffecti, ALuint, ALenum, ALint*) +DECL_THUNK3(void, alGetEffectiv, ALuint, ALenum, ALint*) + +DECL_THUNK2(void, alGenAuxiliaryEffectSlots, ALsizei, ALuint*) +DECL_THUNK2(void, alDeleteAuxiliaryEffectSlots, ALsizei, const ALuint*) +DECL_THUNK1(ALboolean, alIsAuxiliaryEffectSlot, ALuint) +DECL_THUNK3(void, alAuxiliaryEffectSlotf, ALuint, ALenum, ALfloat) +DECL_THUNK3(void, alAuxiliaryEffectSlotfv, ALuint, ALenum, const ALfloat*) +DECL_THUNK3(void, alAuxiliaryEffectSloti, ALuint, ALenum, ALint) +DECL_THUNK3(void, alAuxiliaryEffectSlotiv, ALuint, ALenum, const ALint*) +DECL_THUNK3(void, alGetAuxiliaryEffectSlotf, ALuint, ALenum, ALfloat*) +DECL_THUNK3(void, alGetAuxiliaryEffectSlotfv, ALuint, ALenum, ALfloat*) +DECL_THUNK3(void, alGetAuxiliaryEffectSloti, ALuint, ALenum, ALint*) +DECL_THUNK3(void, alGetAuxiliaryEffectSlotiv, ALuint, ALenum, ALint*) diff --git a/router/alc.cpp b/router/alc.cpp index 92fe69f7..d43c78ce 100644 --- a/router/alc.cpp +++ b/router/alc.cpp @@ -20,7 +20,7 @@ struct FuncExportEntry { const char *funcName; void *address; }; -static const std::array<FuncExportEntry,95> alcFunctions{{ +static const std::array<FuncExportEntry,128> alcFunctions{{ DECL(alcCreateContext), DECL(alcMakeContextCurrent), DECL(alcProcessContext), @@ -118,6 +118,40 @@ static const std::array<FuncExportEntry,95> alcFunctions{{ DECL(alDopplerVelocity), DECL(alSpeedOfSound), DECL(alDistanceModel), + + DECL(alGenFilters), + DECL(alDeleteFilters), + DECL(alIsFilter), + DECL(alFilterf), + DECL(alFilterfv), + DECL(alFilteri), + DECL(alFilteriv), + DECL(alGetFilterf), + DECL(alGetFilterfv), + DECL(alGetFilteri), + DECL(alGetFilteriv), + DECL(alGenEffects), + DECL(alDeleteEffects), + DECL(alIsEffect), + DECL(alEffectf), + DECL(alEffectfv), + DECL(alEffecti), + DECL(alEffectiv), + DECL(alGetEffectf), + DECL(alGetEffectfv), + DECL(alGetEffecti), + DECL(alGetEffectiv), + DECL(alGenAuxiliaryEffectSlots), + DECL(alDeleteAuxiliaryEffectSlots), + DECL(alIsAuxiliaryEffectSlot), + DECL(alAuxiliaryEffectSlotf), + DECL(alAuxiliaryEffectSlotfv), + DECL(alAuxiliaryEffectSloti), + DECL(alAuxiliaryEffectSlotiv), + DECL(alGetAuxiliaryEffectSlotf), + DECL(alGetAuxiliaryEffectSlotfv), + DECL(alGetAuxiliaryEffectSloti), + DECL(alGetAuxiliaryEffectSlotiv), }}; #undef DECL diff --git a/router/router.cpp b/router/router.cpp index 3d27af24..731db063 100644 --- a/router/router.cpp +++ b/router/router.cpp @@ -226,6 +226,42 @@ static void AddModule(HMODULE module, const WCHAR *name) LOAD_PROC(alcSetThreadContext); LOAD_PROC(alcGetThreadContext); } + if(newdrv.alcIsExtensionPresent(nullptr, "ALC_EXT_EFX")) + { + LOAD_PROC(alGenFilters); + LOAD_PROC(alDeleteFilters); + LOAD_PROC(alIsFilter); + LOAD_PROC(alFilterf); + LOAD_PROC(alFilterfv); + LOAD_PROC(alFilteri); + LOAD_PROC(alFilteriv); + LOAD_PROC(alGetFilterf); + LOAD_PROC(alGetFilterfv); + LOAD_PROC(alGetFilteri); + LOAD_PROC(alGetFilteriv); + LOAD_PROC(alGenEffects); + LOAD_PROC(alDeleteEffects); + LOAD_PROC(alIsEffect); + LOAD_PROC(alEffectf); + LOAD_PROC(alEffectfv); + LOAD_PROC(alEffecti); + LOAD_PROC(alEffectiv); + LOAD_PROC(alGetEffectf); + LOAD_PROC(alGetEffectfv); + LOAD_PROC(alGetEffecti); + LOAD_PROC(alGetEffectiv); + LOAD_PROC(alGenAuxiliaryEffectSlots); + LOAD_PROC(alDeleteAuxiliaryEffectSlots); + LOAD_PROC(alIsAuxiliaryEffectSlot); + LOAD_PROC(alAuxiliaryEffectSlotf); + LOAD_PROC(alAuxiliaryEffectSlotfv); + LOAD_PROC(alAuxiliaryEffectSloti); + LOAD_PROC(alAuxiliaryEffectSlotiv); + LOAD_PROC(alGetAuxiliaryEffectSlotf); + LOAD_PROC(alGetAuxiliaryEffectSlotfv); + LOAD_PROC(alGetAuxiliaryEffectSloti); + LOAD_PROC(alGetAuxiliaryEffectSlotiv); + } } if(err) diff --git a/router/router.h b/router/router.h index 70335421..253494de 100644 --- a/router/router.h +++ b/router/router.h @@ -122,6 +122,40 @@ struct DriverIface { LPALSPEEDOFSOUND alSpeedOfSound{nullptr}; LPALDISTANCEMODEL alDistanceModel{nullptr}; + LPALGENFILTERS alGenFilters{nullptr}; + LPALDELETEFILTERS alDeleteFilters{nullptr}; + LPALISFILTER alIsFilter{nullptr}; + LPALFILTERF alFilterf{nullptr}; + LPALFILTERFV alFilterfv{nullptr}; + LPALFILTERI alFilteri{nullptr}; + LPALFILTERIV alFilteriv{nullptr}; + LPALGETFILTERF alGetFilterf{nullptr}; + LPALGETFILTERFV alGetFilterfv{nullptr}; + LPALGETFILTERI alGetFilteri{nullptr}; + LPALGETFILTERIV alGetFilteriv{nullptr}; + LPALGENEFFECTS alGenEffects{nullptr}; + LPALDELETEEFFECTS alDeleteEffects{nullptr}; + LPALISEFFECT alIsEffect{nullptr}; + LPALEFFECTF alEffectf{nullptr}; + LPALEFFECTFV alEffectfv{nullptr}; + LPALEFFECTI alEffecti{nullptr}; + LPALEFFECTIV alEffectiv{nullptr}; + LPALGETEFFECTF alGetEffectf{nullptr}; + LPALGETEFFECTFV alGetEffectfv{nullptr}; + LPALGETEFFECTI alGetEffecti{nullptr}; + LPALGETEFFECTIV alGetEffectiv{nullptr}; + LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots{nullptr}; + LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots{nullptr}; + LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot{nullptr}; + LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf{nullptr}; + LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv{nullptr}; + LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti{nullptr}; + LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv{nullptr}; + LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf{nullptr}; + LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv{nullptr}; + LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti{nullptr}; + LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv{nullptr}; + DriverIface(std::wstring name, HMODULE mod) : Name(std::move(name)), Module(mod) { } |