diff options
Diffstat (limited to 'alc/context.h')
-rw-r--r-- | alc/context.h | 60 |
1 files changed, 8 insertions, 52 deletions
diff --git a/alc/context.h b/alc/context.h index b3f548c8..3e31c9b8 100644 --- a/alc/context.h +++ b/alc/context.h @@ -33,57 +33,14 @@ struct ALeffect; struct ALeffectslot; struct ALsource; +struct DebugGroup; +struct DebugLogEntry; -using uint = unsigned int; - +enum class DebugSource : uint8_t; +enum class DebugType : uint8_t; +enum class DebugSeverity : uint8_t; -constexpr uint DebugSourceBase{0}; -enum class DebugSource : uint8_t { - API = 0, - System, - ThirdParty, - Application, - Other, -}; -constexpr uint DebugSourceCount{5}; - -constexpr uint DebugTypeBase{DebugSourceBase + DebugSourceCount}; -enum class DebugType : uint8_t { - Error = 0, - DeprecatedBehavior, - UndefinedBehavior, - Portability, - Performance, - Marker, - Other, -}; -constexpr uint DebugTypeCount{7}; - -constexpr uint DebugSeverityBase{DebugTypeBase + DebugTypeCount}; -enum class DebugSeverity : uint8_t { - High = 0, - Medium, - Low, - Notification, -}; -constexpr uint DebugSeverityCount{4}; - -struct LogEntry { - const DebugSource mSource; - const DebugType mType; - const DebugSeverity mSeverity; - const uint mId; - - std::string mMessage; - - template<typename T> - LogEntry(DebugSource source, DebugType type, uint id, DebugSeverity severity, T&& message) - : mSource{source}, mType{type}, mSeverity{severity}, mId{id} - , mMessage{std::forward<T>(message)} - { } - LogEntry(const LogEntry&) = default; - LogEntry(LogEntry&&) = default; -}; +using uint = unsigned int; struct SourceSubList { @@ -145,9 +102,8 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase { std::mutex mDebugCbLock; ALDEBUGPROCSOFT mDebugCb{}; void *mDebugParam{nullptr}; - std::vector<uint> mDebugFilters; - std::vector<uint64_t> mDebugIdFilters; - std::deque<LogEntry> mDebugLog; + std::vector<DebugGroup> mDebugGroups; + std::deque<DebugLogEntry> mDebugLog; ALlistener mListener{}; |