aboutsummaryrefslogtreecommitdiffstats
path: root/alc/device.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-03-23 19:13:21 -0700
committerChris Robinson <[email protected]>2022-03-23 19:13:21 -0700
commit3b09b7761fe625ba157b9913243c556fbebbbbe1 (patch)
tree42c14c43661fd73274f6dad072e0085094ab5666 /alc/device.cpp
parent964a11ef629fa3a89e827516a47949c858ce864c (diff)
Handle more modes with the ALC_OUTPUT_MODE_SOFT attribute
Diffstat (limited to 'alc/device.cpp')
-rw-r--r--alc/device.cpp20
1 files changed, 20 insertions, 0 deletions
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;
+}