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 | |
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')
-rw-r--r-- | al/auxeffectslot.cpp | 23 | ||||
-rw-r--r-- | al/buffer.cpp | 51 | ||||
-rw-r--r-- | al/effect.cpp | 23 | ||||
-rw-r--r-- | al/filter.cpp | 23 | ||||
-rw-r--r-- | al/listener.cpp | 25 | ||||
-rw-r--r-- | al/source.cpp | 79 | ||||
-rw-r--r-- | al/state.cpp | 32 |
7 files changed, 125 insertions, 131 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index 8fd158e8..6f82db71 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -310,6 +310,7 @@ inline void UpdateProps(ALeffectslot *slot, ALCcontext *context) } // namespace +AL_API DECL_FUNC2(void, alGenAuxiliaryEffectSlots, ALsizei, ALuint*) FORCE_ALIGN void AL_APIENTRY alGenAuxiliaryEffectSlotsDirect(ALCcontext *context, ALsizei n, ALuint *effectslots) noexcept { @@ -350,6 +351,7 @@ FORCE_ALIGN void AL_APIENTRY alGenAuxiliaryEffectSlotsDirect(ALCcontext *context } } +AL_API DECL_FUNC2(void, alDeleteAuxiliaryEffectSlots, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alDeleteAuxiliaryEffectSlotsDirect(ALCcontext *context, ALsizei n, const ALuint *effectslots) noexcept { @@ -410,6 +412,7 @@ FORCE_ALIGN void AL_APIENTRY alDeleteAuxiliaryEffectSlotsDirect(ALCcontext *cont } } +AL_API DECL_FUNC1(ALboolean, alIsAuxiliaryEffectSlot, ALuint) FORCE_ALIGN ALboolean AL_APIENTRY alIsAuxiliaryEffectSlotDirect(ALCcontext *context, ALuint effectslot) noexcept { @@ -521,6 +524,7 @@ AL_API void AL_APIENTRY alAuxiliaryEffectSlotStopvSOFT(ALsizei n, const ALuint * } +AL_API DECL_FUNC3(void, alAuxiliaryEffectSloti, ALuint, ALenum, ALint) FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotiDirect(ALCcontext *context, ALuint effectslot, ALenum param, ALint value) noexcept { @@ -657,6 +661,7 @@ FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotiDirect(ALCcontext *context, A UpdateProps(slot, context); } +AL_API DECL_FUNC3(void, alAuxiliaryEffectSlotiv, ALuint, ALenum, const ALint*) FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotivDirect(ALCcontext *context, ALuint effectslot, ALenum param, const ALint *values) noexcept { @@ -684,6 +689,7 @@ FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotivDirect(ALCcontext *context, } } +AL_API DECL_FUNC3(void, alAuxiliaryEffectSlotf, ALuint, ALenum, ALfloat) FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotfDirect(ALCcontext *context, ALuint effectslot, ALenum param, ALfloat value) noexcept { @@ -710,6 +716,7 @@ FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotfDirect(ALCcontext *context, A UpdateProps(slot, context); } +AL_API DECL_FUNC3(void, alAuxiliaryEffectSlotfv, ALuint, ALenum, const ALfloat*) FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotfvDirect(ALCcontext *context, ALuint effectslot, ALenum param, const ALfloat *values) noexcept { @@ -734,6 +741,7 @@ FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotfvDirect(ALCcontext *context, } +AL_API DECL_FUNC3(void, alGetAuxiliaryEffectSloti, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetAuxiliaryEffectSlotiDirect(ALCcontext *context, ALuint effectslot, ALenum param, ALint *value) noexcept { @@ -771,6 +779,7 @@ FORCE_ALIGN void AL_APIENTRY alGetAuxiliaryEffectSlotiDirect(ALCcontext *context } } +AL_API DECL_FUNC3(void, alGetAuxiliaryEffectSlotiv, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetAuxiliaryEffectSlotivDirect(ALCcontext *context, ALuint effectslot, ALenum param, ALint *values) noexcept { @@ -798,6 +807,7 @@ FORCE_ALIGN void AL_APIENTRY alGetAuxiliaryEffectSlotivDirect(ALCcontext *contex } } +AL_API DECL_FUNC3(void, alGetAuxiliaryEffectSlotf, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetAuxiliaryEffectSlotfDirect(ALCcontext *context, ALuint effectslot, ALenum param, ALfloat *value) noexcept { @@ -817,6 +827,7 @@ FORCE_ALIGN void AL_APIENTRY alGetAuxiliaryEffectSlotfDirect(ALCcontext *context } } +AL_API DECL_FUNC3(void, alGetAuxiliaryEffectSlotfv, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetAuxiliaryEffectSlotfvDirect(ALCcontext *context, ALuint effectslot, ALenum param, ALfloat *values) noexcept { @@ -840,18 +851,6 @@ FORCE_ALIGN void AL_APIENTRY alGetAuxiliaryEffectSlotfvDirect(ALCcontext *contex } } -AL_API DECL_FUNC2(void, alGenAuxiliaryEffectSlots, ALsizei, ALuint*) -AL_API DECL_FUNC2(void, alDeleteAuxiliaryEffectSlots, ALsizei, const ALuint*) -AL_API DECL_FUNC1(ALboolean, alIsAuxiliaryEffectSlot, ALuint) -AL_API DECL_FUNC3(void, alAuxiliaryEffectSlotf, ALuint, ALenum, ALfloat) -AL_API DECL_FUNC3(void, alAuxiliaryEffectSlotfv, ALuint, ALenum, const ALfloat*) -AL_API DECL_FUNC3(void, alAuxiliaryEffectSloti, ALuint, ALenum, ALint) -AL_API DECL_FUNC3(void, alAuxiliaryEffectSlotiv, ALuint, ALenum, const ALint*) -AL_API DECL_FUNC3(void, alGetAuxiliaryEffectSlotf, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC3(void, alGetAuxiliaryEffectSlotfv, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC3(void, alGetAuxiliaryEffectSloti, ALuint, ALenum, ALint*) -AL_API DECL_FUNC3(void, alGetAuxiliaryEffectSlotiv, ALuint, ALenum, ALint*) - ALeffectslot::ALeffectslot(ALCcontext *context) { diff --git a/al/buffer.cpp b/al/buffer.cpp index 01f61793..58e8f375 100644 --- a/al/buffer.cpp +++ b/al/buffer.cpp @@ -636,6 +636,7 @@ std::optional<DecompResult> DecomposeUserFormat(ALenum format) } // namespace +AL_API DECL_FUNC2(void, alGenBuffers, ALsizei, ALuint*) FORCE_ALIGN void AL_APIENTRY alGenBuffersDirect(ALCcontext *context, ALsizei n, ALuint *buffers) noexcept { if(n < 0) UNLIKELY @@ -671,6 +672,7 @@ FORCE_ALIGN void AL_APIENTRY alGenBuffersDirect(ALCcontext *context, ALsizei n, } } +AL_API DECL_FUNC2(void, alDeleteBuffers, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alDeleteBuffersDirect(ALCcontext *context, ALsizei n, const ALuint *buffers) noexcept { @@ -711,6 +713,7 @@ FORCE_ALIGN void AL_APIENTRY alDeleteBuffersDirect(ALCcontext *context, ALsizei std::for_each(buffers, buffers_end, delete_buffer); } +AL_API DECL_FUNC1(ALboolean, alIsBuffer, ALuint) FORCE_ALIGN ALboolean AL_APIENTRY alIsBufferDirect(ALCcontext *context, ALuint buffer) noexcept { ALCdevice *device{context->mALDevice.get()}; @@ -731,6 +734,7 @@ AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid FORCE_ALIGN void AL_APIENTRY alBufferDataDirect(ALCcontext *context, ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq) noexcept { alBufferStorageDirectSOFT(context, buffer, format, data, size, freq, 0); } +AL_API DECL_FUNCEXT6(void, alBufferStorage,SOFT, ALuint, ALenum, const ALvoid*, ALsizei, ALsizei, ALbitfieldSOFT) FORCE_ALIGN void AL_APIENTRY alBufferStorageDirectSOFT(ALCcontext *context, ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq, ALbitfieldSOFT flags) noexcept { @@ -763,6 +767,7 @@ FORCE_ALIGN void AL_APIENTRY alBufferStorageDirectSOFT(ALCcontext *context, ALui } } +DECL_FUNC5(void, alBufferDataStatic, ALuint, ALenum, ALvoid*, ALsizei, ALsizei) FORCE_ALIGN void AL_APIENTRY alBufferDataStaticDirect(ALCcontext *context, const ALuint buffer, ALenum format, ALvoid *data, ALsizei size, ALsizei freq) noexcept { @@ -785,6 +790,7 @@ FORCE_ALIGN void AL_APIENTRY alBufferDataStaticDirect(ALCcontext *context, const static_cast<std::byte*>(data), static_cast<ALuint>(size)); } +AL_API DECL_FUNCEXT4(void*, alMapBuffer,SOFT, ALuint, ALsizei, ALsizei, ALbitfieldSOFT) FORCE_ALIGN void* AL_APIENTRY alMapBufferDirectSOFT(ALCcontext *context, ALuint buffer, ALsizei offset, ALsizei length, ALbitfieldSOFT access) noexcept { @@ -835,6 +841,7 @@ FORCE_ALIGN void* AL_APIENTRY alMapBufferDirectSOFT(ALCcontext *context, ALuint return nullptr; } +AL_API DECL_FUNCEXT1(void, alUnmapBuffer,SOFT, ALuint) FORCE_ALIGN void AL_APIENTRY alUnmapBufferDirectSOFT(ALCcontext *context, ALuint buffer) noexcept { ALCdevice *device{context->mALDevice.get()}; @@ -853,6 +860,7 @@ FORCE_ALIGN void AL_APIENTRY alUnmapBufferDirectSOFT(ALCcontext *context, ALuint } } +AL_API DECL_FUNCEXT3(void, alFlushMappedBuffer,SOFT, ALuint, ALsizei, ALsizei) FORCE_ALIGN void AL_APIENTRY alFlushMappedBufferDirectSOFT(ALCcontext *context, ALuint buffer, ALsizei offset, ALsizei length) noexcept { @@ -881,6 +889,7 @@ FORCE_ALIGN void AL_APIENTRY alFlushMappedBufferDirectSOFT(ALCcontext *context, } } +AL_API DECL_FUNCEXT5(void, alBufferSubData,SOFT, ALuint, ALenum, const ALvoid*, ALsizei, ALsizei) FORCE_ALIGN void AL_APIENTRY alBufferSubDataDirectSOFT(ALCcontext *context, ALuint buffer, ALenum format, const ALvoid *data, ALsizei offset, ALsizei length) noexcept { @@ -937,6 +946,7 @@ FORCE_ALIGN void AL_APIENTRY alBufferSubDataDirectSOFT(ALCcontext *context, ALui } +AL_API DECL_FUNC3(void, alBufferf, ALuint, ALenum, ALfloat) FORCE_ALIGN void AL_APIENTRY alBufferfDirect(ALCcontext *context, ALuint buffer, ALenum param, ALfloat /*value*/) noexcept { @@ -952,6 +962,7 @@ FORCE_ALIGN void AL_APIENTRY alBufferfDirect(ALCcontext *context, ALuint buffer, } } +AL_API DECL_FUNC5(void, alBuffer3f, ALuint, ALenum, ALfloat, ALfloat, ALfloat) FORCE_ALIGN void AL_APIENTRY alBuffer3fDirect(ALCcontext *context, ALuint buffer, ALenum param, ALfloat /*value1*/, ALfloat /*value2*/, ALfloat /*value3*/) noexcept { @@ -967,6 +978,7 @@ FORCE_ALIGN void AL_APIENTRY alBuffer3fDirect(ALCcontext *context, ALuint buffer } } +AL_API DECL_FUNC3(void, alBufferfv, ALuint, ALenum, const ALfloat*) FORCE_ALIGN void AL_APIENTRY alBufferfvDirect(ALCcontext *context, ALuint buffer, ALenum param, const ALfloat *values) noexcept { @@ -985,6 +997,7 @@ FORCE_ALIGN void AL_APIENTRY alBufferfvDirect(ALCcontext *context, ALuint buffer } +AL_API DECL_FUNC3(void, alBufferi, ALuint, ALenum, ALint) FORCE_ALIGN void AL_APIENTRY alBufferiDirect(ALCcontext *context, ALuint buffer, ALenum param, ALint value) noexcept { @@ -1042,6 +1055,7 @@ FORCE_ALIGN void AL_APIENTRY alBufferiDirect(ALCcontext *context, ALuint buffer, } } +AL_API DECL_FUNC5(void, alBuffer3i, ALuint, ALenum, ALint, ALint, ALint) FORCE_ALIGN void AL_APIENTRY alBuffer3iDirect(ALCcontext *context, ALuint buffer, ALenum param, ALint /*value1*/, ALint /*value2*/, ALint /*value3*/) noexcept { @@ -1057,6 +1071,7 @@ FORCE_ALIGN void AL_APIENTRY alBuffer3iDirect(ALCcontext *context, ALuint buffer } } +AL_API DECL_FUNC3(void, alBufferiv, ALuint, ALenum, const ALint*) FORCE_ALIGN void AL_APIENTRY alBufferivDirect(ALCcontext *context, ALuint buffer, ALenum param, const ALint *values) noexcept { @@ -1103,6 +1118,7 @@ FORCE_ALIGN void AL_APIENTRY alBufferivDirect(ALCcontext *context, ALuint buffer } +AL_API DECL_FUNC3(void, alGetBufferf, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetBufferfDirect(ALCcontext *context, ALuint buffer, ALenum param, ALfloat *value) noexcept { @@ -1126,6 +1142,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBufferfDirect(ALCcontext *context, ALuint buff } } +AL_API DECL_FUNC5(void, alGetBuffer3f, ALuint, ALenum, ALfloat*, ALfloat*, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetBuffer3fDirect(ALCcontext *context, ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) noexcept { @@ -1143,6 +1160,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBuffer3fDirect(ALCcontext *context, ALuint buf } } +AL_API DECL_FUNC3(void, alGetBufferfv, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetBufferfvDirect(ALCcontext *context, ALuint buffer, ALenum param, ALfloat *values) noexcept { @@ -1168,6 +1186,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBufferfvDirect(ALCcontext *context, ALuint buf } +AL_API DECL_FUNC3(void, alGetBufferi, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetBufferiDirect(ALCcontext *context, ALuint buffer, ALenum param, ALint *value) noexcept { @@ -1231,6 +1250,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBufferiDirect(ALCcontext *context, ALuint buff } } +AL_API DECL_FUNC5(void, alGetBuffer3i, ALuint, ALenum, ALint*, ALint*, ALint*) FORCE_ALIGN void AL_APIENTRY alGetBuffer3iDirect(ALCcontext *context, ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3) noexcept { @@ -1247,6 +1267,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBuffer3iDirect(ALCcontext *context, ALuint buf } } +AL_API DECL_FUNC3(void, alGetBufferiv, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetBufferivDirect(ALCcontext *context, ALuint buffer, ALenum param, ALint *values) noexcept { @@ -1288,6 +1309,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBufferivDirect(ALCcontext *context, ALuint buf } +AL_API DECL_FUNCEXT5(void, alBufferCallback,SOFT, ALuint, ALenum, ALsizei, ALBUFFERCALLBACKTYPESOFT, ALvoid*) FORCE_ALIGN void AL_APIENTRY alBufferCallbackDirectSOFT(ALCcontext *context, ALuint buffer, ALenum format, ALsizei freq, ALBUFFERCALLBACKTYPESOFT callback, ALvoid *userptr) noexcept { @@ -1312,6 +1334,7 @@ FORCE_ALIGN void AL_APIENTRY alBufferCallbackDirectSOFT(ALCcontext *context, ALu } } +AL_API DECL_FUNCEXT3(void, alGetBufferPtr,SOFT, ALuint, ALenum, ALvoid**) FORCE_ALIGN void AL_APIENTRY alGetBufferPtrDirectSOFT(ALCcontext *context, ALuint buffer, ALenum param, ALvoid **value) noexcept { @@ -1336,6 +1359,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBufferPtrDirectSOFT(ALCcontext *context, ALuin } } +AL_API DECL_FUNCEXT5(void, alGetBuffer3Ptr,SOFT, ALuint, ALenum, ALvoid**, ALvoid**, ALvoid**) FORCE_ALIGN void AL_APIENTRY alGetBuffer3PtrDirectSOFT(ALCcontext *context, ALuint buffer, ALenum param, ALvoid **value1, ALvoid **value2, ALvoid **value3) noexcept { @@ -1352,6 +1376,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBuffer3PtrDirectSOFT(ALCcontext *context, ALui } } +AL_API DECL_FUNCEXT3(void, alGetBufferPtrv,SOFT, ALuint, ALenum, ALvoid**) FORCE_ALIGN void AL_APIENTRY alGetBufferPtrvDirectSOFT(ALCcontext *context, ALuint buffer, ALenum param, ALvoid **values) noexcept { @@ -1377,32 +1402,6 @@ FORCE_ALIGN void AL_APIENTRY alGetBufferPtrvDirectSOFT(ALCcontext *context, ALui } -AL_API DECL_FUNC2(void, alGenBuffers, ALsizei, ALuint*) -AL_API DECL_FUNC2(void, alDeleteBuffers, ALsizei, const ALuint*) -AL_API DECL_FUNC1(ALboolean, alIsBuffer, ALuint) -DECL_FUNC5(void, alBufferDataStatic, ALuint, ALenum, ALvoid*, ALsizei, ALsizei) -AL_API DECL_FUNCEXT5(void, alBufferCallback,SOFT, ALuint, ALenum, ALsizei, ALBUFFERCALLBACKTYPESOFT, ALvoid*) -AL_API DECL_FUNCEXT6(void, alBufferStorage,SOFT, ALuint, ALenum, const ALvoid*, ALsizei, ALsizei, ALbitfieldSOFT) -AL_API DECL_FUNCEXT4(void*, alMapBuffer,SOFT, ALuint, ALsizei, ALsizei, ALbitfieldSOFT) -AL_API DECL_FUNCEXT1(void, alUnmapBuffer,SOFT, ALuint) -AL_API DECL_FUNCEXT3(void, alFlushMappedBuffer,SOFT, ALuint, ALsizei, ALsizei) -AL_API DECL_FUNCEXT5(void, alBufferSubData,SOFT, ALuint, ALenum, const ALvoid*, ALsizei, ALsizei) -AL_API DECL_FUNC3(void, alBufferf, ALuint, ALenum, ALfloat) -AL_API DECL_FUNC5(void, alBuffer3f, ALuint, ALenum, ALfloat, ALfloat, ALfloat) -AL_API DECL_FUNC3(void, alBufferfv, ALuint, ALenum, const ALfloat*) -AL_API DECL_FUNC3(void, alBufferi, ALuint, ALenum, ALint) -AL_API DECL_FUNC5(void, alBuffer3i, ALuint, ALenum, ALint, ALint, ALint) -AL_API DECL_FUNC3(void, alBufferiv, ALuint, ALenum, const ALint*) -AL_API DECL_FUNC3(void, alGetBufferf, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC5(void, alGetBuffer3f, ALuint, ALenum, ALfloat*, ALfloat*, ALfloat*) -AL_API DECL_FUNC3(void, alGetBufferfv, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC3(void, alGetBufferi, ALuint, ALenum, ALint*) -AL_API DECL_FUNC5(void, alGetBuffer3i, ALuint, ALenum, ALint*, ALint*, ALint*) -AL_API DECL_FUNC3(void, alGetBufferiv, ALuint, ALenum, ALint*) -AL_API DECL_FUNCEXT3(void, alGetBufferPtr,SOFT, ALuint, ALenum, ALvoid**) -AL_API DECL_FUNCEXT5(void, alGetBuffer3Ptr,SOFT, ALuint, ALenum, ALvoid**, ALvoid**, ALvoid**) -AL_API DECL_FUNCEXT3(void, alGetBufferPtrv,SOFT, ALuint, ALenum, ALvoid**) - AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint /*buffer*/, ALuint /*samplerate*/, ALenum /*internalformat*/, ALsizei /*samples*/, ALenum /*channels*/, ALenum /*type*/, const ALvoid* /*data*/) noexcept diff --git a/al/effect.cpp b/al/effect.cpp index 041f0a2e..81cbb4c6 100644 --- a/al/effect.cpp +++ b/al/effect.cpp @@ -231,6 +231,7 @@ inline ALeffect *LookupEffect(ALCdevice *device, ALuint id) } // namespace +AL_API DECL_FUNC2(void, alGenEffects, ALsizei, ALuint*) FORCE_ALIGN void AL_APIENTRY alGenEffectsDirect(ALCcontext *context, ALsizei n, ALuint *effects) noexcept { if(n < 0) UNLIKELY @@ -266,6 +267,7 @@ FORCE_ALIGN void AL_APIENTRY alGenEffectsDirect(ALCcontext *context, ALsizei n, } } +AL_API DECL_FUNC2(void, alDeleteEffects, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alDeleteEffectsDirect(ALCcontext *context, ALsizei n, const ALuint *effects) noexcept { @@ -297,6 +299,7 @@ FORCE_ALIGN void AL_APIENTRY alDeleteEffectsDirect(ALCcontext *context, ALsizei std::for_each(effects, effects_end, delete_effect); } +AL_API DECL_FUNC1(ALboolean, alIsEffect, ALuint) FORCE_ALIGN ALboolean AL_APIENTRY alIsEffectDirect(ALCcontext *context, ALuint effect) noexcept { ALCdevice *device{context->mALDevice.get()}; @@ -306,6 +309,7 @@ FORCE_ALIGN ALboolean AL_APIENTRY alIsEffectDirect(ALCcontext *context, ALuint e return AL_FALSE; } +AL_API DECL_FUNC3(void, alEffecti, ALuint, ALenum, ALint) FORCE_ALIGN void AL_APIENTRY alEffectiDirect(ALCcontext *context, ALuint effect, ALenum param, ALint value) noexcept { @@ -345,6 +349,7 @@ FORCE_ALIGN void AL_APIENTRY alEffectiDirect(ALCcontext *context, ALuint effect, } } +AL_API DECL_FUNC3(void, alEffectiv, ALuint, ALenum, const ALint*) FORCE_ALIGN void AL_APIENTRY alEffectivDirect(ALCcontext *context, ALuint effect, ALenum param, const ALint *values) noexcept { @@ -371,6 +376,7 @@ FORCE_ALIGN void AL_APIENTRY alEffectivDirect(ALCcontext *context, ALuint effect } } +AL_API DECL_FUNC3(void, alEffectf, ALuint, ALenum, ALfloat) FORCE_ALIGN void AL_APIENTRY alEffectfDirect(ALCcontext *context, ALuint effect, ALenum param, ALfloat value) noexcept { @@ -390,6 +396,7 @@ FORCE_ALIGN void AL_APIENTRY alEffectfDirect(ALCcontext *context, ALuint effect, } } +AL_API DECL_FUNC3(void, alEffectfv, ALuint, ALenum, const ALfloat*) FORCE_ALIGN void AL_APIENTRY alEffectfvDirect(ALCcontext *context, ALuint effect, ALenum param, const ALfloat *values) noexcept { @@ -409,6 +416,7 @@ FORCE_ALIGN void AL_APIENTRY alEffectfvDirect(ALCcontext *context, ALuint effect } } +AL_API DECL_FUNC3(void, alGetEffecti, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetEffectiDirect(ALCcontext *context, ALuint effect, ALenum param, ALint *value) noexcept { @@ -430,6 +438,7 @@ FORCE_ALIGN void AL_APIENTRY alGetEffectiDirect(ALCcontext *context, ALuint effe } } +AL_API DECL_FUNC3(void, alGetEffectiv, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetEffectivDirect(ALCcontext *context, ALuint effect, ALenum param, ALint *values) noexcept { @@ -456,6 +465,7 @@ FORCE_ALIGN void AL_APIENTRY alGetEffectivDirect(ALCcontext *context, ALuint eff } } +AL_API DECL_FUNC3(void, alGetEffectf, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetEffectfDirect(ALCcontext *context, ALuint effect, ALenum param, ALfloat *value) noexcept { @@ -475,6 +485,7 @@ FORCE_ALIGN void AL_APIENTRY alGetEffectfDirect(ALCcontext *context, ALuint effe } } +AL_API DECL_FUNC3(void, alGetEffectfv, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetEffectfvDirect(ALCcontext *context, ALuint effect, ALenum param, ALfloat *values) noexcept { @@ -494,18 +505,6 @@ FORCE_ALIGN void AL_APIENTRY alGetEffectfvDirect(ALCcontext *context, ALuint eff } } -AL_API DECL_FUNC2(void, alGenEffects, ALsizei, ALuint*) -AL_API DECL_FUNC2(void, alDeleteEffects, ALsizei, const ALuint*) -AL_API DECL_FUNC1(ALboolean, alIsEffect, ALuint) -AL_API DECL_FUNC3(void, alEffectf, ALuint, ALenum, ALfloat) -AL_API DECL_FUNC3(void, alEffectfv, ALuint, ALenum, const ALfloat*) -AL_API DECL_FUNC3(void, alEffecti, ALuint, ALenum, ALint) -AL_API DECL_FUNC3(void, alEffectiv, ALuint, ALenum, const ALint*) -AL_API DECL_FUNC3(void, alGetEffectf, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC3(void, alGetEffectfv, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC3(void, alGetEffecti, ALuint, ALenum, ALint*) -AL_API DECL_FUNC3(void, alGetEffectiv, ALuint, ALenum, ALint*) - void InitEffect(ALeffect *effect) { 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() { diff --git a/al/listener.cpp b/al/listener.cpp index 8d715a10..ea2ebb3f 100644 --- a/al/listener.cpp +++ b/al/listener.cpp @@ -69,6 +69,7 @@ inline void CommitAndUpdateProps(ALCcontext *context) } // namespace +AL_API DECL_FUNC2(void, alListenerf, ALenum, ALfloat) FORCE_ALIGN void AL_APIENTRY alListenerfDirect(ALCcontext *context, ALenum param, ALfloat value) noexcept { ALlistener &listener = context->mListener; @@ -94,6 +95,7 @@ FORCE_ALIGN void AL_APIENTRY alListenerfDirect(ALCcontext *context, ALenum param } } +AL_API DECL_FUNC4(void, alListener3f, ALenum, ALfloat, ALfloat, ALfloat) FORCE_ALIGN void AL_APIENTRY alListener3fDirect(ALCcontext *context, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) noexcept { @@ -124,6 +126,7 @@ FORCE_ALIGN void AL_APIENTRY alListener3fDirect(ALCcontext *context, ALenum para } } +AL_API DECL_FUNC2(void, alListenerfv, ALenum, const ALfloat*) FORCE_ALIGN void AL_APIENTRY alListenerfvDirect(ALCcontext *context, ALenum param, const ALfloat *values) noexcept { @@ -167,6 +170,7 @@ FORCE_ALIGN void AL_APIENTRY alListenerfvDirect(ALCcontext *context, ALenum para } +AL_API DECL_FUNC2(void, alListeneri, ALenum, ALint) FORCE_ALIGN void AL_APIENTRY alListeneriDirect(ALCcontext *context, ALenum param, ALint /*value*/) noexcept { std::lock_guard<std::mutex> _{context->mPropLock}; @@ -177,6 +181,7 @@ FORCE_ALIGN void AL_APIENTRY alListeneriDirect(ALCcontext *context, ALenum param } } +AL_API DECL_FUNC4(void, alListener3i, ALenum, ALint, ALint, ALint) FORCE_ALIGN void AL_APIENTRY alListener3iDirect(ALCcontext *context, ALenum param, ALint value1, ALint value2, ALint value3) noexcept { @@ -197,6 +202,7 @@ FORCE_ALIGN void AL_APIENTRY alListener3iDirect(ALCcontext *context, ALenum para } } +AL_API DECL_FUNC2(void, alListeneriv, ALenum, const ALint*) FORCE_ALIGN void AL_APIENTRY alListenerivDirect(ALCcontext *context, ALenum param, const ALint *values) noexcept { @@ -233,6 +239,7 @@ FORCE_ALIGN void AL_APIENTRY alListenerivDirect(ALCcontext *context, ALenum para } +AL_API DECL_FUNC2(void, alGetListenerf, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetListenerfDirect(ALCcontext *context, ALenum param, ALfloat *value) noexcept { @@ -255,6 +262,7 @@ FORCE_ALIGN void AL_APIENTRY alGetListenerfDirect(ALCcontext *context, ALenum pa } } +AL_API DECL_FUNC4(void, alGetListener3f, ALenum, ALfloat*, ALfloat*, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetListener3fDirect(ALCcontext *context, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) noexcept { @@ -281,6 +289,7 @@ FORCE_ALIGN void AL_APIENTRY alGetListener3fDirect(ALCcontext *context, ALenum p } } +AL_API DECL_FUNC2(void, alGetListenerfv, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetListenerfvDirect(ALCcontext *context, ALenum param, ALfloat *values) noexcept { @@ -319,6 +328,7 @@ FORCE_ALIGN void AL_APIENTRY alGetListenerfvDirect(ALCcontext *context, ALenum p } +AL_API DECL_FUNC2(void, alGetListeneri, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetListeneriDirect(ALCcontext *context, ALenum param, ALint *value) noexcept { std::lock_guard<std::mutex> _{context->mPropLock}; @@ -331,6 +341,7 @@ FORCE_ALIGN void AL_APIENTRY alGetListeneriDirect(ALCcontext *context, ALenum pa } } +AL_API DECL_FUNC4(void, alGetListener3i, ALenum, ALint*, ALint*, ALint*) FORCE_ALIGN void AL_APIENTRY alGetListener3iDirect(ALCcontext *context, ALenum param, ALint *value1, ALint *value2, ALint *value3) noexcept { @@ -357,6 +368,7 @@ FORCE_ALIGN void AL_APIENTRY alGetListener3iDirect(ALCcontext *context, ALenum p } } +AL_API DECL_FUNC2(void, alGetListeneriv, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetListenerivDirect(ALCcontext *context, ALenum param, ALint *values) noexcept { @@ -388,16 +400,3 @@ FORCE_ALIGN void AL_APIENTRY alGetListenerivDirect(ALCcontext *context, ALenum p context->setError(AL_INVALID_ENUM, "Invalid listener integer-vector property"); } } - -AL_API DECL_FUNC2(void, alListenerf, ALenum, ALfloat) -AL_API DECL_FUNC4(void, alListener3f, ALenum, ALfloat, ALfloat, ALfloat) -AL_API DECL_FUNC2(void, alListenerfv, ALenum, const ALfloat*) -AL_API DECL_FUNC2(void, alListeneri, ALenum, ALint) -AL_API DECL_FUNC4(void, alListener3i, ALenum, ALint, ALint, ALint) -AL_API DECL_FUNC2(void, alListeneriv, ALenum, const ALint*) -AL_API DECL_FUNC2(void, alGetListenerf, ALenum, ALfloat*) -AL_API DECL_FUNC4(void, alGetListener3f, ALenum, ALfloat*, ALfloat*, ALfloat*) -AL_API DECL_FUNC2(void, alGetListenerfv, ALenum, ALfloat*) -AL_API DECL_FUNC2(void, alGetListeneri, ALenum, ALint*) -AL_API DECL_FUNC4(void, alGetListener3i, ALenum, ALint*, ALint*, ALint*) -AL_API DECL_FUNC2(void, alGetListeneriv, ALenum, ALint*) diff --git a/al/source.cpp b/al/source.cpp index adea9715..70182ec8 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -2625,6 +2625,7 @@ void StartSources(ALCcontext *const context, const al::span<ALsource*> srchandle } // namespace +AL_API DECL_FUNC2(void, alGenSources, ALsizei, ALuint*) FORCE_ALIGN void AL_APIENTRY alGenSourcesDirect(ALCcontext *context, ALsizei n, ALuint *sources) noexcept { if(n < 0) UNLIKELY @@ -2670,6 +2671,7 @@ FORCE_ALIGN void AL_APIENTRY alGenSourcesDirect(ALCcontext *context, ALsizei n, } } +AL_API DECL_FUNC2(void, alDeleteSources, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alDeleteSourcesDirect(ALCcontext *context, ALsizei n, const ALuint *sources) noexcept { @@ -2697,6 +2699,7 @@ FORCE_ALIGN void AL_APIENTRY alDeleteSourcesDirect(ALCcontext *context, ALsizei std::for_each(sources, sources_end, delete_source); } +AL_API DECL_FUNC1(ALboolean, alIsSource, ALuint) FORCE_ALIGN ALboolean AL_APIENTRY alIsSourceDirect(ALCcontext *context, ALuint source) noexcept { std::lock_guard<std::mutex> _{context->mSourceLock}; @@ -2706,6 +2709,7 @@ FORCE_ALIGN ALboolean AL_APIENTRY alIsSourceDirect(ALCcontext *context, ALuint s } +AL_API DECL_FUNC3(void, alSourcef, ALuint, ALenum, ALfloat) FORCE_ALIGN void AL_APIENTRY alSourcefDirect(ALCcontext *context, ALuint source, ALenum param, ALfloat value) noexcept { @@ -2719,6 +2723,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcefDirect(ALCcontext *context, ALuint source, al::span<const float,1>{&value, 1u}); } +AL_API DECL_FUNC5(void, alSource3f, ALuint, ALenum, ALfloat, ALfloat, ALfloat) FORCE_ALIGN void AL_APIENTRY alSource3fDirect(ALCcontext *context, ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) noexcept { @@ -2732,6 +2737,7 @@ FORCE_ALIGN void AL_APIENTRY alSource3fDirect(ALCcontext *context, ALuint source SetProperty(Source, context, static_cast<SourceProp>(param), al::span{fvals}); } +AL_API DECL_FUNC3(void, alSourcefv, ALuint, ALenum, const ALfloat*) FORCE_ALIGN void AL_APIENTRY alSourcefvDirect(ALCcontext *context, ALuint source, ALenum param, const ALfloat *values) noexcept { @@ -2748,6 +2754,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcefvDirect(ALCcontext *context, ALuint source } +AL_API DECL_FUNCEXT3(void, alSourced,SOFT, ALuint, ALenum, ALdouble) FORCE_ALIGN void AL_APIENTRY alSourcedDirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALdouble value) noexcept { @@ -2761,6 +2768,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcedDirectSOFT(ALCcontext *context, ALuint sou al::span<const double,1>{&value, 1}); } +AL_API DECL_FUNCEXT5(void, alSource3d,SOFT, ALuint, ALenum, ALdouble, ALdouble, ALdouble) FORCE_ALIGN void AL_APIENTRY alSource3dDirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALdouble value1, ALdouble value2, ALdouble value3) noexcept { @@ -2774,6 +2782,7 @@ FORCE_ALIGN void AL_APIENTRY alSource3dDirectSOFT(ALCcontext *context, ALuint so SetProperty(Source, context, static_cast<SourceProp>(param), al::span{dvals}); } +AL_API DECL_FUNCEXT3(void, alSourcedv,SOFT, ALuint, ALenum, const ALdouble*) FORCE_ALIGN void AL_APIENTRY alSourcedvDirectSOFT(ALCcontext *context, ALuint source, ALenum param, const ALdouble *values) noexcept { @@ -2790,6 +2799,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcedvDirectSOFT(ALCcontext *context, ALuint so } +AL_API DECL_FUNC3(void, alSourcei, ALuint, ALenum, ALint) FORCE_ALIGN void AL_APIENTRY alSourceiDirect(ALCcontext *context, ALuint source, ALenum param, ALint value) noexcept { @@ -2803,6 +2813,7 @@ FORCE_ALIGN void AL_APIENTRY alSourceiDirect(ALCcontext *context, ALuint source, al::span<const int,1>{&value, 1u}); } +AL_API DECL_FUNC5(void, alSource3i, ALuint, ALenum, ALint, ALint, ALint) FORCE_ALIGN void AL_APIENTRY alSource3iDirect(ALCcontext *context, ALuint source, ALenum param, ALint value1, ALint value2, ALint value3) noexcept { @@ -2816,6 +2827,7 @@ FORCE_ALIGN void AL_APIENTRY alSource3iDirect(ALCcontext *context, ALuint source SetProperty(Source, context, static_cast<SourceProp>(param), al::span{ivals}); } +AL_API DECL_FUNC3(void, alSourceiv, ALuint, ALenum, const ALint*) FORCE_ALIGN void AL_APIENTRY alSourceivDirect(ALCcontext *context, ALuint source, ALenum param, const ALint *values) noexcept { @@ -2832,6 +2844,7 @@ FORCE_ALIGN void AL_APIENTRY alSourceivDirect(ALCcontext *context, ALuint source } +AL_API DECL_FUNCEXT3(void, alSourcei64,SOFT, ALuint, ALenum, ALint64SOFT) FORCE_ALIGN void AL_APIENTRY alSourcei64DirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALint64SOFT value) noexcept { @@ -2845,6 +2858,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcei64DirectSOFT(ALCcontext *context, ALuint s al::span<const int64_t,1>{&value, 1u}); } +AL_API DECL_FUNCEXT5(void, alSource3i64,SOFT, ALuint, ALenum, ALint64SOFT, ALint64SOFT, ALint64SOFT) FORCE_ALIGN void AL_APIENTRY alSource3i64DirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALint64SOFT value1, ALint64SOFT value2, ALint64SOFT value3) noexcept { @@ -2858,6 +2872,7 @@ FORCE_ALIGN void AL_APIENTRY alSource3i64DirectSOFT(ALCcontext *context, ALuint SetProperty(Source, context, static_cast<SourceProp>(param), al::span{i64vals}); } +AL_API DECL_FUNCEXT3(void, alSourcei64v,SOFT, ALuint, ALenum, const ALint64SOFT*) FORCE_ALIGN void AL_APIENTRY alSourcei64vDirectSOFT(ALCcontext *context, ALuint source, ALenum param, const ALint64SOFT *values) noexcept { @@ -2874,6 +2889,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcei64vDirectSOFT(ALCcontext *context, ALuint } +AL_API DECL_FUNC3(void, alGetSourcef, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetSourcefDirect(ALCcontext *context, ALuint source, ALenum param, ALfloat *value) noexcept { @@ -2888,6 +2904,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSourcefDirect(ALCcontext *context, ALuint sour al::span<float,1>{value, 1}); } +AL_API DECL_FUNC5(void, alGetSource3f, ALuint, ALenum, ALfloat*, ALfloat*, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetSource3fDirect(ALCcontext *context, ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) noexcept { @@ -2907,6 +2924,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSource3fDirect(ALCcontext *context, ALuint sou } } +AL_API DECL_FUNC3(void, alGetSourcefv, ALuint, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetSourcefvDirect(ALCcontext *context, ALuint source, ALenum param, ALfloat *values) noexcept { @@ -2923,6 +2941,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSourcefvDirect(ALCcontext *context, ALuint sou } +AL_API DECL_FUNCEXT3(void, alGetSourced,SOFT, ALuint, ALenum, ALdouble*) FORCE_ALIGN void AL_APIENTRY alGetSourcedDirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALdouble *value) noexcept { @@ -2937,6 +2956,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSourcedDirectSOFT(ALCcontext *context, ALuint al::span<double,1>{value, 1u}); } +AL_API DECL_FUNCEXT5(void, alGetSource3d,SOFT, ALuint, ALenum, ALdouble*, ALdouble*, ALdouble*) FORCE_ALIGN void AL_APIENTRY alGetSource3dDirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALdouble *value1, ALdouble *value2, ALdouble *value3) noexcept { @@ -2956,6 +2976,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSource3dDirectSOFT(ALCcontext *context, ALuint } } +AL_API DECL_FUNCEXT3(void, alGetSourcedv,SOFT, ALuint, ALenum, ALdouble*) FORCE_ALIGN void AL_APIENTRY alGetSourcedvDirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALdouble *values) noexcept { @@ -2972,6 +2993,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSourcedvDirectSOFT(ALCcontext *context, ALuint } +AL_API DECL_FUNC3(void, alGetSourcei, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetSourceiDirect(ALCcontext *context, ALuint source, ALenum param, ALint *value) noexcept { @@ -2986,6 +3008,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSourceiDirect(ALCcontext *context, ALuint sour al::span{value, 1u}); } +AL_API DECL_FUNC5(void, alGetSource3i, ALuint, ALenum, ALint*, ALint*, ALint*) FORCE_ALIGN void AL_APIENTRY alGetSource3iDirect(ALCcontext *context, ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3) noexcept { @@ -3005,6 +3028,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSource3iDirect(ALCcontext *context, ALuint sou } } +AL_API DECL_FUNC3(void, alGetSourceiv, ALuint, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetSourceivDirect(ALCcontext *context, ALuint source, ALenum param, ALint *values) noexcept { @@ -3021,6 +3045,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSourceivDirect(ALCcontext *context, ALuint sou } +AL_API DECL_FUNCEXT3(void, alGetSourcei64,SOFT, ALuint, ALenum, ALint64SOFT*) FORCE_ALIGN void AL_APIENTRY alGetSourcei64DirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALint64SOFT *value) noexcept { std::lock_guard<std::mutex> _{context->mSourceLock}; @@ -3034,6 +3059,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSourcei64DirectSOFT(ALCcontext *context, ALuin al::span{value, 1u}); } +AL_API DECL_FUNCEXT5(void, alGetSource3i64,SOFT, ALuint, ALenum, ALint64SOFT*, ALint64SOFT*, ALint64SOFT*) FORCE_ALIGN void AL_APIENTRY alGetSource3i64DirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALint64SOFT *value1, ALint64SOFT *value2, ALint64SOFT *value3) noexcept { @@ -3053,6 +3079,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSource3i64DirectSOFT(ALCcontext *context, ALui } } +AL_API DECL_FUNCEXT3(void, alGetSourcei64v,SOFT, ALuint, ALenum, ALint64SOFT*) FORCE_ALIGN void AL_APIENTRY alGetSourcei64vDirectSOFT(ALCcontext *context, ALuint source, ALenum param, ALint64SOFT *values) noexcept { @@ -3069,6 +3096,7 @@ FORCE_ALIGN void AL_APIENTRY alGetSourcei64vDirectSOFT(ALCcontext *context, ALui } +AL_API DECL_FUNC1(void, alSourcePlay, ALuint) FORCE_ALIGN void AL_APIENTRY alSourcePlayDirect(ALCcontext *context, ALuint source) noexcept { std::lock_guard<std::mutex> _{context->mSourceLock}; @@ -3079,6 +3107,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcePlayDirect(ALCcontext *context, ALuint sour StartSources(context, {&srchandle, 1}); } +FORCE_ALIGN DECL_FUNCEXT2(void, alSourcePlayAtTime,SOFT, ALuint, ALint64SOFT) FORCE_ALIGN void AL_APIENTRY alSourcePlayAtTimeDirectSOFT(ALCcontext *context, ALuint source, ALint64SOFT start_time) noexcept { @@ -3093,6 +3122,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcePlayAtTimeDirectSOFT(ALCcontext *context, A StartSources(context, {&srchandle, 1}, nanoseconds{start_time}); } +AL_API DECL_FUNC2(void, alSourcePlayv, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alSourcePlayvDirect(ALCcontext *context, ALsizei n, const ALuint *sources) noexcept { @@ -3123,6 +3153,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcePlayvDirect(ALCcontext *context, ALsizei n, StartSources(context, srchandles); } +FORCE_ALIGN DECL_FUNCEXT3(void, alSourcePlayAtTimev,SOFT, ALsizei, const ALuint*, ALint64SOFT) FORCE_ALIGN void AL_APIENTRY alSourcePlayAtTimevDirectSOFT(ALCcontext *context, ALsizei n, const ALuint *sources, ALint64SOFT start_time) noexcept { @@ -3157,9 +3188,11 @@ FORCE_ALIGN void AL_APIENTRY alSourcePlayAtTimevDirectSOFT(ALCcontext *context, } +AL_API DECL_FUNC1(void, alSourcePause, ALuint) FORCE_ALIGN void AL_APIENTRY alSourcePauseDirect(ALCcontext *context, ALuint source) noexcept { alSourcePausevDirect(context, 1, &source); } +AL_API DECL_FUNC2(void, alSourcePausev, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alSourcePausevDirect(ALCcontext *context, ALsizei n, const ALuint *sources) noexcept { @@ -3227,9 +3260,11 @@ FORCE_ALIGN void AL_APIENTRY alSourcePausevDirect(ALCcontext *context, ALsizei n } +AL_API DECL_FUNC1(void, alSourceStop, ALuint) FORCE_ALIGN void AL_APIENTRY alSourceStopDirect(ALCcontext *context, ALuint source) noexcept { alSourceStopvDirect(context, 1, &source); } +AL_API DECL_FUNC2(void, alSourceStopv, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alSourceStopvDirect(ALCcontext *context, ALsizei n, const ALuint *sources) noexcept { @@ -3284,9 +3319,11 @@ FORCE_ALIGN void AL_APIENTRY alSourceStopvDirect(ALCcontext *context, ALsizei n, } +AL_API DECL_FUNC1(void, alSourceRewind, ALuint) FORCE_ALIGN void AL_APIENTRY alSourceRewindDirect(ALCcontext *context, ALuint source) noexcept { alSourceRewindvDirect(context, 1, &source); } +AL_API DECL_FUNC2(void, alSourceRewindv, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alSourceRewindvDirect(ALCcontext *context, ALsizei n, const ALuint *sources) noexcept { @@ -3343,6 +3380,7 @@ FORCE_ALIGN void AL_APIENTRY alSourceRewindvDirect(ALCcontext *context, ALsizei } +AL_API DECL_FUNC3(void, alSourceQueueBuffers, ALuint, ALsizei, const ALuint*) FORCE_ALIGN void AL_APIENTRY alSourceQueueBuffersDirect(ALCcontext *context, ALuint src, ALsizei nb, const ALuint *buffers) noexcept { @@ -3467,6 +3505,7 @@ FORCE_ALIGN void AL_APIENTRY alSourceQueueBuffersDirect(ALCcontext *context, ALu } } +AL_API DECL_FUNC3(void, alSourceUnqueueBuffers, ALuint, ALsizei, ALuint*) FORCE_ALIGN void AL_APIENTRY alSourceUnqueueBuffersDirect(ALCcontext *context, ALuint src, ALsizei nb, ALuint *buffers) noexcept { @@ -3517,46 +3556,6 @@ FORCE_ALIGN void AL_APIENTRY alSourceUnqueueBuffersDirect(ALCcontext *context, A } -AL_API DECL_FUNC2(void, alGenSources, ALsizei, ALuint*) -AL_API DECL_FUNC2(void, alDeleteSources, ALsizei, const ALuint*) -AL_API DECL_FUNC1(ALboolean, alIsSource, ALuint) -AL_API DECL_FUNC1(void, alSourcePlay, ALuint) -AL_API DECL_FUNC1(void, alSourcePause, ALuint) -AL_API DECL_FUNC1(void, alSourceStop, ALuint) -AL_API DECL_FUNC1(void, alSourceRewind, ALuint) -AL_API DECL_FUNC2(void, alSourcePlayv, ALsizei, const ALuint*) -AL_API DECL_FUNC2(void, alSourcePausev, ALsizei, const ALuint*) -AL_API DECL_FUNC2(void, alSourceStopv, ALsizei, const ALuint*) -AL_API DECL_FUNC2(void, alSourceRewindv, ALsizei, const ALuint*) -AL_API DECL_FUNC3(void, alSourcef, ALuint, ALenum, ALfloat) -AL_API DECL_FUNC5(void, alSource3f, ALuint, ALenum, ALfloat, ALfloat, ALfloat) -AL_API DECL_FUNC3(void, alSourcefv, ALuint, ALenum, const ALfloat*) -AL_API DECL_FUNC3(void, alSourcei, ALuint, ALenum, ALint) -AL_API DECL_FUNC5(void, alSource3i, ALuint, ALenum, ALint, ALint, ALint) -AL_API DECL_FUNC3(void, alSourceiv, ALuint, ALenum, const ALint*) -AL_API DECL_FUNCEXT3(void, alSourced,SOFT, ALuint, ALenum, ALdouble) -AL_API DECL_FUNCEXT5(void, alSource3d,SOFT, ALuint, ALenum, ALdouble, ALdouble, ALdouble) -AL_API DECL_FUNCEXT3(void, alSourcedv,SOFT, ALuint, ALenum, const ALdouble*) -AL_API DECL_FUNCEXT3(void, alSourcei64,SOFT, ALuint, ALenum, ALint64SOFT) -AL_API DECL_FUNCEXT5(void, alSource3i64,SOFT, ALuint, ALenum, ALint64SOFT, ALint64SOFT, ALint64SOFT) -AL_API DECL_FUNCEXT3(void, alSourcei64v,SOFT, ALuint, ALenum, const ALint64SOFT*) -AL_API DECL_FUNC3(void, alGetSourcef, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC5(void, alGetSource3f, ALuint, ALenum, ALfloat*, ALfloat*, ALfloat*) -AL_API DECL_FUNC3(void, alGetSourcefv, ALuint, ALenum, ALfloat*) -AL_API DECL_FUNC3(void, alGetSourcei, ALuint, ALenum, ALint*) -AL_API DECL_FUNC5(void, alGetSource3i, ALuint, ALenum, ALint*, ALint*, ALint*) -AL_API DECL_FUNC3(void, alGetSourceiv, ALuint, ALenum, ALint*) -AL_API DECL_FUNCEXT3(void, alGetSourced,SOFT, ALuint, ALenum, ALdouble*) -AL_API DECL_FUNCEXT5(void, alGetSource3d,SOFT, ALuint, ALenum, ALdouble*, ALdouble*, ALdouble*) -AL_API DECL_FUNCEXT3(void, alGetSourcedv,SOFT, ALuint, ALenum, ALdouble*) -AL_API DECL_FUNCEXT3(void, alGetSourcei64,SOFT, ALuint, ALenum, ALint64SOFT*) -AL_API DECL_FUNCEXT5(void, alGetSource3i64,SOFT, ALuint, ALenum, ALint64SOFT*, ALint64SOFT*, ALint64SOFT*) -AL_API DECL_FUNCEXT3(void, alGetSourcei64v,SOFT, ALuint, ALenum, ALint64SOFT*) -AL_API DECL_FUNC3(void, alSourceQueueBuffers, ALuint, ALsizei, const ALuint*) -AL_API DECL_FUNC3(void, alSourceUnqueueBuffers, ALuint, ALsizei, ALuint*) -FORCE_ALIGN DECL_FUNCEXT2(void, alSourcePlayAtTime,SOFT, ALuint, ALint64SOFT) -FORCE_ALIGN DECL_FUNCEXT3(void, alSourcePlayAtTimev,SOFT, ALsizei, const ALuint*, ALint64SOFT) - AL_API void AL_APIENTRY alSourceQueueBufferLayersSOFT(ALuint, ALsizei, const ALuint*) noexcept { ContextRef context{GetContextRef()}; diff --git a/al/state.cpp b/al/state.cpp index e831ccc1..5b0772c7 100644 --- a/al/state.cpp +++ b/al/state.cpp @@ -302,6 +302,7 @@ AL_API const ALchar* AL_APIENTRY alsoft_get_version(void) noexcept } +AL_API DECL_FUNC1(void, alEnable, ALenum) FORCE_ALIGN void AL_APIENTRY alEnableDirect(ALCcontext *context, ALenum capability) noexcept { switch(capability) @@ -327,6 +328,7 @@ FORCE_ALIGN void AL_APIENTRY alEnableDirect(ALCcontext *context, ALenum capabili } } +AL_API DECL_FUNC1(void, alDisable, ALenum) FORCE_ALIGN void AL_APIENTRY alDisableDirect(ALCcontext *context, ALenum capability) noexcept { switch(capability) @@ -352,6 +354,7 @@ FORCE_ALIGN void AL_APIENTRY alDisableDirect(ALCcontext *context, ALenum capabil } } +AL_API DECL_FUNC1(ALboolean, alIsEnabled, ALenum) FORCE_ALIGN ALboolean AL_APIENTRY alIsEnabledDirect(ALCcontext *context, ALenum capability) noexcept { std::lock_guard<std::mutex> _{context->mPropLock}; @@ -404,6 +407,7 @@ DECL_GETFUNC(ALvoid*, alGetPointer,SOFT) #undef DECL_GETFUNC +AL_API DECL_FUNC2(void, alGetBooleanv, ALenum, ALboolean*) FORCE_ALIGN void AL_APIENTRY alGetBooleanvDirect(ALCcontext *context, ALenum pname, ALboolean *values) noexcept { if(!values) UNLIKELY @@ -411,6 +415,7 @@ FORCE_ALIGN void AL_APIENTRY alGetBooleanvDirect(ALCcontext *context, ALenum pna GetValue(context, pname, values); } +AL_API DECL_FUNC2(void, alGetDoublev, ALenum, ALdouble*) FORCE_ALIGN void AL_APIENTRY alGetDoublevDirect(ALCcontext *context, ALenum pname, ALdouble *values) noexcept { if(!values) UNLIKELY @@ -418,6 +423,7 @@ FORCE_ALIGN void AL_APIENTRY alGetDoublevDirect(ALCcontext *context, ALenum pnam GetValue(context, pname, values); } +AL_API DECL_FUNC2(void, alGetFloatv, ALenum, ALfloat*) FORCE_ALIGN void AL_APIENTRY alGetFloatvDirect(ALCcontext *context, ALenum pname, ALfloat *values) noexcept { if(!values) UNLIKELY @@ -425,6 +431,7 @@ FORCE_ALIGN void AL_APIENTRY alGetFloatvDirect(ALCcontext *context, ALenum pname GetValue(context, pname, values); } +AL_API DECL_FUNC2(void, alGetIntegerv, ALenum, ALint*) FORCE_ALIGN void AL_APIENTRY alGetIntegervDirect(ALCcontext *context, ALenum pname, ALint *values) noexcept { if(!values) UNLIKELY @@ -432,6 +439,7 @@ FORCE_ALIGN void AL_APIENTRY alGetIntegervDirect(ALCcontext *context, ALenum pna GetValue(context, pname, values); } +AL_API DECL_FUNCEXT2(void, alGetInteger64v,SOFT, ALenum, ALint64SOFT*) FORCE_ALIGN void AL_APIENTRY alGetInteger64vDirectSOFT(ALCcontext *context, ALenum pname, ALint64SOFT *values) noexcept { if(!values) UNLIKELY @@ -439,6 +447,7 @@ FORCE_ALIGN void AL_APIENTRY alGetInteger64vDirectSOFT(ALCcontext *context, ALen GetValue(context, pname, values); } +AL_API DECL_FUNCEXT2(void, alGetPointerv,SOFT, ALenum, ALvoid**) FORCE_ALIGN void AL_APIENTRY alGetPointervDirectSOFT(ALCcontext *context, ALenum pname, ALvoid **values) noexcept { if(!values) UNLIKELY @@ -467,6 +476,7 @@ FORCE_ALIGN void AL_APIENTRY alGetPointervDirectSOFT(ALCcontext *context, ALenum } } +AL_API DECL_FUNC1(const ALchar*, alGetString, ALenum) FORCE_ALIGN const ALchar* AL_APIENTRY alGetStringDirect(ALCcontext *context, ALenum pname) noexcept { const ALchar *value{nullptr}; @@ -526,6 +536,7 @@ FORCE_ALIGN const ALchar* AL_APIENTRY alGetStringDirect(ALCcontext *context, ALe return value; } +AL_API DECL_FUNC1(void, alDopplerFactor, ALfloat) FORCE_ALIGN void AL_APIENTRY alDopplerFactorDirect(ALCcontext *context, ALfloat value) noexcept { if(!(value >= 0.0f && std::isfinite(value))) @@ -538,6 +549,7 @@ FORCE_ALIGN void AL_APIENTRY alDopplerFactorDirect(ALCcontext *context, ALfloat } } +AL_API DECL_FUNC1(void, alSpeedOfSound, ALfloat) FORCE_ALIGN void AL_APIENTRY alSpeedOfSoundDirect(ALCcontext *context, ALfloat value) noexcept { if(!(value > 0.0f && std::isfinite(value))) @@ -550,6 +562,7 @@ FORCE_ALIGN void AL_APIENTRY alSpeedOfSoundDirect(ALCcontext *context, ALfloat v } } +AL_API DECL_FUNC1(void, alDistanceModel, ALenum) FORCE_ALIGN void AL_APIENTRY alDistanceModelDirect(ALCcontext *context, ALenum value) noexcept { if(auto model = DistanceModelFromALenum(value)) @@ -564,12 +577,14 @@ FORCE_ALIGN void AL_APIENTRY alDistanceModelDirect(ALCcontext *context, ALenum v } +AL_API DECL_FUNCEXT(void, alDeferUpdates,SOFT) FORCE_ALIGN void AL_APIENTRY alDeferUpdatesDirectSOFT(ALCcontext *context) noexcept { std::lock_guard<std::mutex> _{context->mPropLock}; context->deferUpdates(); } +AL_API DECL_FUNCEXT(void, alProcessUpdates,SOFT) FORCE_ALIGN void AL_APIENTRY alProcessUpdatesDirectSOFT(ALCcontext *context) noexcept { std::lock_guard<std::mutex> _{context->mPropLock}; @@ -577,6 +592,7 @@ FORCE_ALIGN void AL_APIENTRY alProcessUpdatesDirectSOFT(ALCcontext *context) noe } +AL_API DECL_FUNCEXT2(const ALchar*, alGetStringi,SOFT, ALenum,ALsizei) FORCE_ALIGN const ALchar* AL_APIENTRY alGetStringiDirectSOFT(ALCcontext *context, ALenum pname, ALsizei index) noexcept { const ALchar *value{nullptr}; @@ -595,22 +611,6 @@ FORCE_ALIGN const ALchar* AL_APIENTRY alGetStringiDirectSOFT(ALCcontext *context return value; } -AL_API DECL_FUNC1(void, alEnable, ALenum) -AL_API DECL_FUNC1(void, alDisable, ALenum) -AL_API DECL_FUNC1(ALboolean, alIsEnabled, ALenum) -AL_API DECL_FUNC2(void, alGetBooleanv, ALenum, ALboolean*) -AL_API DECL_FUNC2(void, alGetDoublev, ALenum, ALdouble*) -AL_API DECL_FUNC2(void, alGetFloatv, ALenum, ALfloat*) -AL_API DECL_FUNC2(void, alGetIntegerv, ALenum, ALint*) -AL_API DECL_FUNCEXT2(void, alGetInteger64v,SOFT, ALenum, ALint64SOFT*) -AL_API DECL_FUNCEXT2(void, alGetPointerv,SOFT, ALenum, ALvoid**) -AL_API DECL_FUNC1(const ALchar*, alGetString, ALenum) -AL_API DECL_FUNC1(void, alDopplerFactor, ALfloat) -AL_API DECL_FUNC1(void, alSpeedOfSound, ALfloat) -AL_API DECL_FUNC1(void, alDistanceModel, ALenum) -AL_API DECL_FUNCEXT(void, alDeferUpdates,SOFT) -AL_API DECL_FUNCEXT(void, alProcessUpdates,SOFT) -AL_API DECL_FUNCEXT2(const ALchar*, alGetStringi,SOFT, ALenum,ALsizei) AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value) noexcept { |