aboutsummaryrefslogtreecommitdiffstats
path: root/alc/device.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-04-17 05:27:40 -0700
committerChris Robinson <[email protected]>2022-04-17 05:27:40 -0700
commitac4d4fc7318ea402525c30de93cc665bee3b8af1 (patch)
tree37205adeccfb0bf1804780ef487934a17e64773e /alc/device.cpp
parent5c0eabc5264a58e8fe9f78da6198587d78770d01 (diff)
Always report ALC_ANY_SOFT for output without contexts
Not required, but nicer to be consistent if it's not a meaningful value (e.g. the actual device mode).
Diffstat (limited to 'alc/device.cpp')
-rw-r--r--alc/device.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/alc/device.cpp b/alc/device.cpp
index 3a9b7380..e06c0d74 100644
--- a/alc/device.cpp
+++ b/alc/device.cpp
@@ -68,6 +68,9 @@ void ALCdevice::enumerateHrtfs()
auto ALCdevice::getOutputMode1() const noexcept -> OutputMode1
{
+ if(mContexts.load(std::memory_order_relaxed)->empty())
+ return OutputMode1::Any;
+
switch(FmtChans)
{
case DevFmtMono: return OutputMode1::Mono;