aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2021-06-22 03:25:31 -0700
committerChris Robinson <chris.kcat@gmail.com>2021-06-22 03:25:31 -0700
commitd28cf80b6f9801690cde3d64d638f2ed785dd3a6 (patch)
tree4cb54182385d72f99e0d2228173767943805e452
parent8f3148ba53c5bbccf24667b2459787ce314f3efe (diff)
Allow querying ALC_ALL_DEVICES_SPECIFIER from loopback devices
They only return the default/driver name, since loopback devices don't have a canonical name.
-rw-r--r--alc/alc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index e564fcab..16346801 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2267,8 +2267,10 @@ START_API_FUNC
case ALC_ALL_DEVICES_SPECIFIER:
if(DeviceRef dev{VerifyDevice(Device)})
{
- if(dev->Type != DeviceType::Playback)
+ if(dev->Type == DeviceType::Capture)
alcSetError(dev.get(), ALC_INVALID_ENUM);
+ else if(dev->Type == DeviceType::Loopback)
+ value = alcDefaultName;
else
{
std::lock_guard<std::mutex> _{dev->StateLock};