diff options
author | Chris Robinson <[email protected]> | 2023-07-25 15:24:07 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-07-26 12:58:38 -0700 |
commit | d8f34d616190bf26dd48c8778aa3311c73eca98b (patch) | |
tree | 425c5d5e8a86e72924eae9bc19c52063a5e6f69c /al/filter.cpp | |
parent | 34d07fde84ad64342ae6624334957143319615ab (diff) |
Declare functions closer to where they're needed
This provides better code locality when calling implicit context functions that
call their direct context variants.
Diffstat (limited to 'al/filter.cpp')
-rw-r--r-- | al/filter.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/al/filter.cpp b/al/filter.cpp index ed1a86c9..9ad57b54 100644 --- a/al/filter.cpp +++ b/al/filter.cpp @@ -399,6 +399,7 @@ void FilterTable<BandpassFilterTable>::getParamfv(const ALfilter *filter, ALenum { getParamf(filter, param, vals); } +AL_API DECL_FUNC2(void, alGenFilters, ALsizei, ALuint*) FORCE_ALIGN void AL_APIENTRY alGenFiltersDirect(ALCcontext *context, ALsizei n, ALuint *filters) noexcept { if(n < 0) UNLIKELY @@ -434,6 +435,7 @@ FORCE_ALIGN void AL_APIENTRY alGenFiltersDirect(ALCcontext *context, ALsizei n, } } +AL_API DECL_FUNC2(void, alDeleteFilters, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alDeleteFiltersDirect(ALCcontext *context, ALsizei n, const ALuint *filters) noexcept { @@ -465,6 +467,7 @@ FORCE_ALIGN void AL_APIENTRY alDeleteFiltersDirect(ALCcontext *context, ALsizei std::for_each(filters, filters_end, delete_filter); } +AL_API DECL_FUNC1(ALboolean, alIsFilter, ALuint) FORCE_ALIGN ALboolean AL_APIENTRY alIsFilterDirect(ALCcontext *context, ALuint filter) noexcept { ALCdevice *device{context->mALDevice.get()}; @@ -475,6 +478,7 @@ FORCE_ALIGN ALboolean AL_APIENTRY alIsFilterDirect(ALCcontext *context, ALuint f } +AL_API DECL_FUNC3(void, alFilteri, ALuint, ALenum, ALint) FORCE_ALIGN void AL_APIENTRY alFilteriDirect(ALCcontext *context, ALuint filter, ALenum param, ALint value) noexcept { @@ -503,6 +507,7 @@ FORCE_ALIGN void AL_APIENTRY alFilteriDirect(ALCcontext *context, ALuint filter, } } +AL_API DECL_FUNC3(void, alFilteriv, ALuint, ALenum, const ALint*) FORCE_ALIGN void AL_APIENTRY alFilterivDirect(ALCcontext *context, ALuint filter, ALenum param, const ALint *values) noexcept { @@ -530,6 +535,7 @@ FORCE_ALIGN void AL_APIENTRY alFilterivDirect(ALCcontext *context, ALuint filter } } +AL_API DECL_FUNC3(void, alFilterf, ALuint, ALenum, ALfloat) FORCE_ALIGN void AL_APIENTRY alFilterfDirect(ALCcontext *context, ALuint filter, ALenum param, ALfloat value) noexcept { @@ -550,6 +556,7 @@ FORCE_ALIGN void AL_APIENTRY alFilterfDirect(ALCcontext *context, ALuint filter, } } +AL_API DECL_FUNC3(void, alFilterfv, ALuint, ALenum, const ALfloat*) FORCE_ALIGN void AL_APIENTRY alFilterfvDirect(ALCcontext *context, ALuint filter, ALenum param, const ALfloat *values) noexcept { @@ -570,6 +577,7 @@ FORCE_ALIGN void AL_APIENTRY alFilterfvDirect(ALCcontext *context, ALuint filter } } +AL_API DECL_FUNC3(void, alGetFilteri, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetFilteriDirect(ALCcontext *context, ALuint filter, ALenum param, ALint *value) noexcept { @@ -592,6 +600,7 @@ FORCE_ALIGN void AL_APIENTRY alGetFilteriDirect(ALCcontext *context, ALuint filt } } +AL_API DECL_FUNC3(void, alGetFilteriv, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetFilterivDirect(ALCcontext *context, ALuint filter, ALenum param, ALint *values) noexcept { @@ -619,6 +628,7 @@ FORCE_ALIGN void AL_APIENTRY alGetFilterivDirect(ALCcontext *context, ALuint fil } } +AL_API DECL_FUNC3(void, alGetFilterf, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetFilterfDirect(ALCcontext *context, ALuint filter, ALenum param, ALfloat *value) noexcept { @@ -639,6 +649,7 @@ FORCE_ALIGN void AL_APIENTRY alGetFilterfDirect(ALCcontext *context, ALuint filt } } +AL_API DECL_FUNC3(void, alGetFilterfv, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetFilterfvDirect(ALCcontext *context, ALuint filter, ALenum param, ALfloat *values) noexcept { @@ -659,18 +670,6 @@ FORCE_ALIGN void AL_APIENTRY alGetFilterfvDirect(ALCcontext *context, ALuint fil } } -AL_API DECL_FUNC2(void, alGenFilters, ALsizei, ALuint*) -AL_API DECL_FUNC2(void, alDeleteFilters, ALsizei, const ALuint*) -AL_API DECL_FUNC1(ALboolean, alIsFilter, ALuint) -AL_API DECL_FUNC3(void, alFilterf, ALuint, ALenum, ALfloat) -AL_API DECL_FUNC3(void, alFilterfv, ALuint, ALenum, const ALfloat*) -AL_API DECL_FUNC3(void, alFilteri, ALuint, ALenum, ALint) -AL_API DECL_FUNC3(void, alFilteriv, ALuint, ALenum, const ALint*) -AL_API DECL_FUNC3(void, alGetFilterf, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC3(void, alGetFilterfv, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC3(void, alGetFilteri, ALuint, ALenum, ALint*) -AL_API DECL_FUNC3(void, alGetFilteriv, ALuint, ALenum, ALint*) - FilterSubList::~FilterSubList() { |