From 3b09b7761fe625ba157b9913243c556fbebbbbe1 Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat@gmail.com>
Date: Wed, 23 Mar 2022 19:13:21 -0700
Subject: Handle more modes with the ALC_OUTPUT_MODE_SOFT attribute

---
 alc/device.cpp | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

(limited to 'alc/device.cpp')

diff --git a/alc/device.cpp b/alc/device.cpp
index 01153d51..11f66df7 100644
--- a/alc/device.cpp
+++ b/alc/device.cpp
@@ -65,3 +65,23 @@ void ALCdevice::enumerateHrtfs()
             std::rotate(mHrtfList.begin(), iter, iter+1);
     }
 }
+
+auto ALCdevice::getOutputMode1() const noexcept -> OutputMode1
+{
+    switch(FmtChans)
+    {
+    case DevFmtMono: return OutputMode1::Mono;
+    case DevFmtStereo:
+        if(mHrtf)
+            return OutputMode1::Hrtf;
+        else if(mUhjEncoder)
+            return OutputMode1::Uhj2;
+        return OutputMode1::StereoPlain;
+    case DevFmtQuad: return OutputMode1::Quad;
+    case DevFmtX51: return OutputMode1::X51;
+    case DevFmtX61: return OutputMode1::X61;
+    case DevFmtX71: return OutputMode1::X71;
+    case DevFmtAmbi3D: break;
+    }
+    return OutputMode1::Any;
+}
-- 
cgit v1.2.3