aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-22 02:25:30 -0700
committerChris Robinson <[email protected]>2023-05-22 02:25:30 -0700
commiteca86489e422f00d96ce59a5c53fa45bdcea593e (patch)
tree023fafac55d3dc6888021fccf444f0e0990f3b83 /al/source.cpp
parent586b725cc37345601f01473dcc622241ee80d174 (diff)
Make the API functions noexcept
Only relevant for C++, but these functions can't throw as it's a C-based API. Letting the compiler know that helps improve code generation. Extension callbacks must also not let exceptions leave the callback, or else Bad Things can happen. The macro AL_DISABLE_NOEXCEPT may be defined before including the headers to not mark functions as noexcept, but this should only be done if the caller can't otherwise be fixed.
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/al/source.cpp b/al/source.cpp
index 0efc7fb9..8dbbbcd8 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -3555,28 +3555,16 @@ AL_API DECL_FUNCEXT5(void, alGetSource3i64,SOFT, ALuint, ALenum, ALint64SOFT*, A
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 void AL_APIENTRY alSourcePlayAtTimeSOFT(ALuint source, ALint64SOFT time) START_API_FUNC
-{
- auto context = GetContextRef();
- if(!context) UNLIKELY return;
- return alSourcePlayAtTimeDirectSOFT(context.get(), source, time);
-} END_API_FUNC
-FORCE_ALIGN void AL_APIENTRY alSourcePlayAtTimevSOFT(ALsizei n, const ALuint *sources, ALint64SOFT time) START_API_FUNC
-{
- auto context = GetContextRef();
- if(!context) UNLIKELY return;
- return alSourcePlayAtTimevDirectSOFT(context.get(), n, sources, time);
-} END_API_FUNC
+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*)
-START_API_FUNC
+AL_API void AL_APIENTRY alSourceQueueBufferLayersSOFT(ALuint, ALsizei, const ALuint*) noexcept
{
ContextRef context{GetContextRef()};
if(!context) UNLIKELY return;
context->setError(AL_INVALID_OPERATION, "alSourceQueueBufferLayersSOFT not supported");
}
-END_API_FUNC
ALsource::ALsource()