From 2a27a2ca5ea0f6b6b8fff065212959ea60021647 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 25 Nov 2023 18:58:00 -0800 Subject: Fix some unused parameter and unhandled enum warnings --- alc/backends/base.h | 5 ++--- alc/backends/coreaudio.cpp | 15 ++++++++++----- alc/backends/pipewire.cpp | 23 +++++++++++------------ alc/backends/pulseaudio.cpp | 18 ++++++++++-------- alc/backends/wasapi.cpp | 25 ++++++++++++++----------- 5 files changed, 47 insertions(+), 39 deletions(-) (limited to 'alc/backends') diff --git a/alc/backends/base.h b/alc/backends/base.h index ea3b57a3..eea0d238 100644 --- a/alc/backends/base.h +++ b/alc/backends/base.h @@ -80,9 +80,8 @@ struct BackendFactory { virtual bool querySupport(BackendType type) = 0; - virtual alc::EventSupport queryEventSupport(alc::EventType eventType, BackendType type) { - return alc::EventSupport::NoSupport; - } + virtual alc::EventSupport queryEventSupport(alc::EventType, BackendType) + { return alc::EventSupport::NoSupport; } virtual std::string probe(BackendType type) = 0; diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp index eb4e5880..16b0781e 100644 --- a/alc/backends/coreaudio.cpp +++ b/alc/backends/coreaudio.cpp @@ -1013,12 +1013,17 @@ BackendPtr CoreAudioBackendFactory::createBackend(DeviceBase *device, BackendTyp return nullptr; } -alc::EventSupport CoreAudioBackendFactory::queryEventSupport(alc::EventType eventType, BackendType type) +alc::EventSupport CoreAudioBackendFactory::queryEventSupport(alc::EventType eventType, BackendType) { - switch(eventType) { - case alc::EventType::DefaultDeviceChanged: { - return alc::EventSupport::FullSupport; - } + switch(eventType) + { + case alc::EventType::DefaultDeviceChanged: + return alc::EventSupport::FullSupport; + + case alc::EventType::DeviceAdded: + case alc::EventType::DeviceRemoved: + case alc::EventType::Count: + break; } return alc::EventSupport::NoSupport; } diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp index d1a9d095..6a001d7a 100644 --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp @@ -2266,18 +2266,17 @@ BackendFactory &PipeWireBackendFactory::getFactory() return factory; } -alc::EventSupport PipeWireBackendFactory::queryEventSupport(alc::EventType eventType, BackendType type) +alc::EventSupport PipeWireBackendFactory::queryEventSupport(alc::EventType eventType, BackendType) { - switch(eventType) { - case alc::EventType::DefaultDeviceChanged: { - return alc::EventSupport::FullSupport; - } - case alc::EventType::DeviceAdded: { - return alc::EventSupport::FullSupport; - } - case alc::EventType::DeviceRemoved: { - return alc::EventSupport::FullSupport; - } + switch(eventType) + { + case alc::EventType::DefaultDeviceChanged: + case alc::EventType::DeviceAdded: + case alc::EventType::DeviceRemoved: + return alc::EventSupport::FullSupport; + + case alc::EventType::Count: + break; } return alc::EventSupport::NoSupport; -} \ No newline at end of file +} diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp index 23ed1415..bebc182d 100644 --- a/alc/backends/pulseaudio.cpp +++ b/alc/backends/pulseaudio.cpp @@ -1491,15 +1491,17 @@ BackendFactory &PulseBackendFactory::getFactory() return factory; } -alc::EventSupport PulseBackendFactory::queryEventSupport(alc::EventType eventType, BackendType type) +alc::EventSupport PulseBackendFactory::queryEventSupport(alc::EventType eventType, BackendType) { - switch(eventType) { - case alc::EventType::DeviceAdded: { - return alc::EventSupport::FullSupport; - } - case alc::EventType::DeviceRemoved: { - return alc::EventSupport::FullSupport; - } + switch(eventType) + { + case alc::EventType::DeviceAdded: + case alc::EventType::DeviceRemoved: + return alc::EventSupport::FullSupport; + + case alc::EventType::DefaultDeviceChanged: + case alc::EventType::Count: + break; } return alc::EventSupport::NoSupport; } diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index a4d6ea2f..3ee98457 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -2741,18 +2741,21 @@ BackendFactory &WasapiBackendFactory::getFactory() return factory; } -alc::EventSupport WasapiBackendFactory::queryEventSupport(alc::EventType eventType, BackendType type) +alc::EventSupport WasapiBackendFactory::queryEventSupport(alc::EventType eventType, BackendType) { - switch(eventType) { - case alc::EventType::DefaultDeviceChanged: { - return alc::EventSupport::FullSupport; - } - case alc::EventType::DeviceAdded: { - return alc::EventSupport::FullSupport; - } - case alc::EventType::DeviceRemoved: { - return alc::EventSupport::FullSupport; - } + switch(eventType) + { + case alc::EventType::DefaultDeviceChanged: + return alc::EventSupport::FullSupport; + + case alc::EventType::DeviceAdded: + case alc::EventType::DeviceRemoved: +#if !defined(ALSOFT_UWP) + return alc::EventSupport::FullSupport; +#endif + + case alc::EventType::Count: + break; } return alc::EventSupport::NoSupport; } -- cgit v1.2.3