From edc20c87d3cd37608e8fa50556d718cd32755f3d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 31 May 2023 22:11:15 -0700 Subject: Specify the device type for the event callback --- alc/events.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'alc/events.h') diff --git a/alc/events.h b/alc/events.h index 3b22a4c4..ddb3808a 100644 --- a/alc/events.h +++ b/alc/events.h @@ -19,6 +19,11 @@ enum class EventType : uint8_t { Count }; +enum class DeviceType : ALCenum { + Playback = ALC_PLAYBACK_DEVICE_SOFT, + Capture = ALC_CAPTURE_DEVICE_SOFT, +}; + inline std::bitset EventsEnabled{0}; inline std::mutex EventMutex; @@ -26,10 +31,10 @@ inline std::mutex EventMutex; inline ALCEVENTPROCTYPESOFT EventCallback{}; inline void *EventUserPtr{}; -void Event(alc::EventType eventType, ALCdevice *device, std::string_view message) noexcept; +void Event(EventType eventType, DeviceType deviceType, ALCdevice *device, std::string_view message) noexcept; -inline void Event(alc::EventType eventType, std::string_view message) noexcept -{ Event(eventType, nullptr, message); } +inline void Event(EventType eventType, DeviceType deviceType, std::string_view message) noexcept +{ Event(eventType, deviceType, nullptr, message); } } // namespace alc -- cgit v1.2.3