diff options
author | Chris Robinson <[email protected]> | 2023-05-01 19:11:26 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-05-01 19:11:26 -0700 |
commit | e1b573284b649c6fef42ab5b6ca51978c4a1329a (patch) | |
tree | 2bd2c30bebf142c969560a069417ceba57d4a953 /al/state.cpp | |
parent | bb08a416f1b0e31292b896f2f8845e365daee6b1 (diff) |
Implement pushing/popping debug groups
Diffstat (limited to 'al/state.cpp')
-rw-r--r-- | al/state.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/al/state.cpp b/al/state.cpp index 1e1a0085..2a350646 100644 --- a/al/state.cpp +++ b/al/state.cpp @@ -69,6 +69,8 @@ constexpr ALchar alErrInvalidEnum[] = "Invalid Enum"; constexpr ALchar alErrInvalidValue[] = "Invalid Value"; constexpr ALchar alErrInvalidOp[] = "Invalid Operation"; constexpr ALchar alErrOutOfMemory[] = "Out of Memory"; +constexpr ALchar alStackOverflow[] = "Stack Overflow"; +constexpr ALchar alStackUnderflow[] = "Stack Underflow"; /* Resampler strings */ template<Resampler rtype> struct ResamplerName { }; @@ -264,6 +266,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: return alGetInteger(pname) != 0; } @@ -308,6 +311,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: return alGetInteger(pname); } @@ -338,6 +342,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: return static_cast<ALfloat>(alGetInteger(pname)); case AL_DEFERRED_UPDATES_SOFT: @@ -436,6 +441,10 @@ START_API_FUNC value = MaxDebugLoggedMessages; break; + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: + value = MaxDebugGroupDepth; + break; + #ifdef ALSOFT_EAX #define EAX_ERROR "[alGetInteger] EAX not enabled." @@ -491,6 +500,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: return alGetInteger(pname); } @@ -562,6 +572,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: values[0] = alGetBoolean(pname); return; } @@ -599,6 +610,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: values[0] = alGetDouble(pname); return; } @@ -636,6 +648,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: values[0] = alGetFloat(pname); return; } @@ -673,6 +686,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: values[0] = alGetInteger(pname); return; } @@ -710,6 +724,7 @@ START_API_FUNC case AL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_MESSAGE_LENGTH_SOFT: case AL_MAX_DEBUG_LOGGED_MESSAGES_SOFT: + case AL_MAX_DEBUG_GROUP_STACK_DEPTH_SOFT: values[0] = alGetInteger64SOFT(pname); return; } @@ -806,6 +821,14 @@ START_API_FUNC value = alErrOutOfMemory; break; + case AL_STACK_OVERFLOW_SOFT: + value = alStackOverflow; + break; + + case AL_STACK_UNDERFLOW_SOFT: + value = alStackUnderflow; + break; + default: context->setError(AL_INVALID_VALUE, "Invalid string property 0x%04x", pname); } |