aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-09-20 04:11:52 -0700
committerChris Robinson <[email protected]>2020-09-20 04:11:52 -0700
commit191150d9a8e5dea9350030c8d4cade37fcad1695 (patch)
tree3d5cb8b6c70c9bdd688d805f7b0d8e5f41d09c27 /al
parent8ef242bce084fae0689f2148442d10b5d029a512 (diff)
Remove deprecated, performance, and error event types
These would be better served with a proper debug API, rather than a general audio event API.
Diffstat (limited to 'al')
-rw-r--r--al/error.cpp11
-rw-r--r--al/event.cpp6
-rw-r--r--al/event.h5
-rw-r--r--al/state.cpp14
4 files changed, 1 insertions, 35 deletions
diff --git a/al/error.cpp b/al/error.cpp
index b667d14f..79bbc56c 100644
--- a/al/error.cpp
+++ b/al/error.cpp
@@ -38,8 +38,6 @@
#include "alcontext.h"
#include "alexcpt.h"
#include "almalloc.h"
-#include "event.h"
-#include "inprogext.h"
#include "logging.h"
#include "opthelpers.h"
#include "vector.h"
@@ -65,7 +63,6 @@ void ALCcontext::setError(ALenum errorCode, const char *msg, ...)
if(msglen >= 0) msg = message.data();
else msg = "<internal error constructing message>";
- msglen = static_cast<int>(strlen(msg));
WARN("Error generated on context %p, code 0x%04x, \"%s\"\n",
decltype(std::declval<void*>()){this}, errorCode, msg);
@@ -82,14 +79,6 @@ void ALCcontext::setError(ALenum errorCode, const char *msg, ...)
ALenum curerr{AL_NO_ERROR};
mLastError.compare_exchange_strong(curerr, errorCode);
- if((mEnabledEvts.load(std::memory_order_relaxed)&EventType_Error))
- {
- std::lock_guard<std::mutex> _{mEventCbLock};
- ALbitfieldSOFT enabledevts{mEnabledEvts.load(std::memory_order_relaxed)};
- if((enabledevts&EventType_Error) && mEventCb)
- (*mEventCb)(AL_EVENT_TYPE_ERROR_SOFT, 0, static_cast<ALuint>(errorCode), msglen, msg,
- mEventParam);
- }
}
AL_API ALenum AL_APIENTRY alGetError(void)
diff --git a/al/event.cpp b/al/event.cpp
index cd8ea7c2..296c64e6 100644
--- a/al/event.cpp
+++ b/al/event.cpp
@@ -149,12 +149,6 @@ START_API_FUNC
flags |= EventType_BufferCompleted;
else if(type == AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT)
flags |= EventType_SourceStateChange;
- else if(type == AL_EVENT_TYPE_ERROR_SOFT)
- flags |= EventType_Error;
- else if(type == AL_EVENT_TYPE_PERFORMANCE_SOFT)
- flags |= EventType_Performance;
- else if(type == AL_EVENT_TYPE_DEPRECATED_SOFT)
- flags |= EventType_Deprecated;
else if(type == AL_EVENT_TYPE_DISCONNECTED_SOFT)
flags |= EventType_Disconnected;
else
diff --git a/al/event.h b/al/event.h
index 44d9306f..71374618 100644
--- a/al/event.h
+++ b/al/event.h
@@ -16,10 +16,7 @@ enum {
/* User event types. */
EventType_SourceStateChange = 1<<0,
EventType_BufferCompleted = 1<<1,
- EventType_Error = 1<<2,
- EventType_Performance = 1<<3,
- EventType_Deprecated = 1<<4,
- EventType_Disconnected = 1<<5,
+ EventType_Disconnected = 1<<2,
/* Internal events. */
EventType_ReleaseEffectState = 65536,
diff --git a/al/state.cpp b/al/state.cpp
index 8dda6f5f..dcc87972 100644
--- a/al/state.cpp
+++ b/al/state.cpp
@@ -736,20 +736,6 @@ START_API_FUNC
ContextRef context{GetContextRef()};
if UNLIKELY(!context) return;
- if((context->mEnabledEvts.load(std::memory_order_relaxed)&EventType_Deprecated))
- {
- std::lock_guard<std::mutex> _{context->mEventCbLock};
- ALbitfieldSOFT enabledevts{context->mEnabledEvts.load(std::memory_order_relaxed)};
- if((enabledevts&EventType_Deprecated) && context->mEventCb)
- {
- static const char msg[] =
- "alDopplerVelocity is deprecated in AL1.1, use alSpeedOfSound";
- const ALsizei msglen{sizeof(msg)-1};
- (*context->mEventCb)(AL_EVENT_TYPE_DEPRECATED_SOFT, 0, 0, msglen, msg,
- context->mEventParam);
- }
- }
-
if(!(value >= 0.0f && std::isfinite(value)))
context->setError(AL_INVALID_VALUE, "Doppler velocity %f out of range", value);
else