aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-11-25 18:58:00 -0800
committerChris Robinson <[email protected]>2023-11-25 18:58:00 -0800
commit2a27a2ca5ea0f6b6b8fff065212959ea60021647 (patch)
tree0eaa72a89e008f8cc52ca34e9c0a81ae3c601d9c /alc/alc.cpp
parent889f2daf1f0453fbbebc7ebba74c58584a335043 (diff)
Fix some unused parameter and unhandled enum warnings
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp35
1 files changed, 15 insertions, 20 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index be41f278..6017e743 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -3484,28 +3484,23 @@ FORCE_ALIGN ALCenum ALC_APIENTRY alcEventIsSupportedSOFT(ALCenum eventType, ALCe
alcSetError(nullptr, ALC_INVALID_ENUM);
return ALC_EVENT_NOT_SUPPORTED_SOFT;
}
+
+ auto supported = alc::EventSupport::NoSupport;
switch(deviceType)
{
- case al::to_underlying(alc::DeviceType::Playback):
- {
- if(!PlaybackFactory)
- {
- return ALC_EVENT_NOT_SUPPORTED_SOFT;
- }
+ case ALC_PLAYBACK_DEVICE_SOFT:
+ if(PlaybackFactory)
+ supported = PlaybackFactory->queryEventSupport(*etype, BackendType::Playback);
+ break;
- auto supported = PlaybackFactory->queryEventSupport(*etype, BackendType::Playback);
- return al::to_underlying(supported);
- }
- case al::to_underlying(alc::DeviceType::Capture):
- {
- if(!CaptureFactory)
- {
- return ALC_EVENT_NOT_SUPPORTED_SOFT;
- }
+ case ALC_CAPTURE_DEVICE_SOFT:
+ if(CaptureFactory)
+ supported = CaptureFactory->queryEventSupport(*etype, BackendType::Capture);
+ break;
- auto supported = CaptureFactory->queryEventSupport(*etype, BackendType::Capture);
- return al::to_underlying(supported);
- }
+ default:
+ WARN("Invalid device type: 0x%04x\n", deviceType);
+ alcSetError(nullptr, ALC_INVALID_ENUM);
}
- return ALC_EVENT_NOT_SUPPORTED_SOFT;
-} \ No newline at end of file
+ return al::to_underlying(supported);
+}