aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-07-09 21:25:13 -0700
committerChris Robinson <[email protected]>2021-07-09 21:25:13 -0700
commit10d782502a9f99d42b56e034d2195ee0dc5034fb (patch)
tree34e298e2e362dd28d1d5cc5d23de2e33c1e5525b /alc/backends
parentc8cfdf6ddf22dd2055e7f0850aee45b7d7eecf9c (diff)
Use variables and types when they're defined
Diffstat (limited to 'alc/backends')
-rw-r--r--alc/backends/coreaudio.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index e8d0320d..26b02d14 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -369,6 +369,7 @@ void CoreAudioPlayback::open(const char *name)
}
mAudioUnit = audioUnit;
+#if CAN_ENUMERATE
if(name)
mDevice->DeviceName = name;
else
@@ -382,6 +383,9 @@ void CoreAudioPlayback::open(const char *name)
if(!devname.empty()) mDevice->DeviceName = std::move(devname);
else mDevice->DeviceName = "Unknown Device Name";
}
+#else
+ mDevice->DeviceName = name;
+#endif
}
bool CoreAudioPlayback::reset()
@@ -910,11 +914,13 @@ bool CoreAudioBackendFactory::querySupport(BackendType type)
std::string CoreAudioBackendFactory::probe(BackendType type)
{
std::string outnames;
+#if CAN_ENUMERATE
auto append_name = [&outnames](const DeviceEntry &entry) -> void
{
/* Includes null char. */
outnames.append(entry.mName.c_str(), entry.mName.length()+1);
};
+#endif
switch(type)
{