aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/winmm.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-04-26 23:32:15 -0700
committerChris Robinson <[email protected]>2022-04-26 23:32:15 -0700
commit593966c8dbdbf2dbcd8768b258a3b22adb548b2f (patch)
tree720dd3a36188cdb1ff55165d1b2bd51e5fd7d687 /alc/backends/winmm.cpp
parent07dd62e53f3abaf918262953895961bd38848a7e (diff)
Handle 3D7.1 as a separate channel configuration
It's treated as 5.1 + 2 aux channels. This allows AL_DIRECT_CHANNELS_SOFT to behave better, not forwarding rear left/right channel inputs to lower front and upper rear, and allows reporting a more appropriate output mode to the app instead of 7.1.
Diffstat (limited to 'alc/backends/winmm.cpp')
-rw-r--r--alc/backends/winmm.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp
index 0fdd8a02..14cc4f9e 100644
--- a/alc/backends/winmm.cpp
+++ b/alc/backends/winmm.cpp
@@ -301,23 +301,16 @@ bool WinMMPlayback::reset()
return false;
}
- uint chanmask{};
if(mFormat.nChannels >= 2)
- {
mDevice->FmtChans = DevFmtStereo;
- chanmask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
- }
else if(mFormat.nChannels == 1)
- {
mDevice->FmtChans = DevFmtMono;
- chanmask = SPEAKER_FRONT_CENTER;
- }
else
{
ERR("Unhandled channel count: %d\n", mFormat.nChannels);
return false;
}
- setChannelOrderFromWFXMask(chanmask);
+ setDefaultWFXChannelOrder();
uint BufferSize{mDevice->UpdateSize * mFormat.nChannels * mDevice->bytesFromFmt()};
@@ -476,6 +469,7 @@ void WinMMCapture::open(const char *name)
case DevFmtX51:
case DevFmtX61:
case DevFmtX71:
+ case DevFmtX3D71:
case DevFmtAmbi3D:
throw al::backend_exception{al::backend_error::DeviceError, "%s capture not supported",
DevFmtChannelsString(mDevice->FmtChans)};