aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/wasapi.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-07-30 07:38:26 -0700
committerChris Robinson <[email protected]>2021-07-30 07:38:26 -0700
commit29fba79cd5dd06888da22c7fc18779062c28fc3a (patch)
tree1548234679191873024c7ead9eb07c6088885b7e /alc/backends/wasapi.cpp
parent486eca8ce68e15fa5fff6a53d410aee9251245dd (diff)
Avoid 5.1Rear as its own channel configuration
It messes with 5.1 sources using direct channels, and the surround channels are supposed to map to the side labels. Individual backends can deal with the channel order/label differences, as they already do to a degree.
Diffstat (limited to 'alc/backends/wasapi.cpp')
-rw-r--r--alc/backends/wasapi.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index d38fc25d..e726e8f1 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -876,10 +876,9 @@ HRESULT WasapiPlayback::resetProxy()
mDevice->FmtChans = DevFmtX71;
else if(chancount >= 7 && (chanmask&X61Mask) == X6DOT1)
mDevice->FmtChans = DevFmtX61;
- else if(chancount >= 6 && (chanmask&X51Mask) == X5DOT1)
+ else if(chancount >= 6 && ((chanmask&X51Mask) == X5DOT1
+ || (chanmask&X51RearMask) == X5DOT1REAR))
mDevice->FmtChans = DevFmtX51;
- else if(chancount >= 6 && (chanmask&X51RearMask) == X5DOT1REAR)
- mDevice->FmtChans = DevFmtX51Rear;
else if(chancount >= 4 && (chanmask&QuadMask) == QUAD)
mDevice->FmtChans = DevFmtQuad;
else if(chancount >= 2 && (chanmask&StereoMask) == STEREO)
@@ -912,10 +911,6 @@ HRESULT WasapiPlayback::resetProxy()
OutputType.Format.nChannels = 6;
OutputType.dwChannelMask = X5DOT1;
break;
- case DevFmtX51Rear:
- OutputType.Format.nChannels = 6;
- OutputType.dwChannelMask = X5DOT1REAR;
- break;
case DevFmtX61:
OutputType.Format.nChannels = 7;
OutputType.dwChannelMask = X6DOT1;
@@ -995,10 +990,9 @@ HRESULT WasapiPlayback::resetProxy()
mDevice->FmtChans = DevFmtX71;
else if(chancount >= 7 && (chanmask&X61Mask) == X6DOT1)
mDevice->FmtChans = DevFmtX61;
- else if(chancount >= 6 && (chanmask&X51Mask) == X5DOT1)
+ else if(chancount >= 6 && ((chanmask&X51Mask) == X5DOT1
+ || (chanmask&X51RearMask) == X5DOT1REAR))
mDevice->FmtChans = DevFmtX51;
- else if(chancount >= 6 && (chanmask&X51RearMask) == X5DOT1REAR)
- mDevice->FmtChans = DevFmtX51Rear;
else if(chancount >= 4 && (chanmask&QuadMask) == QUAD)
mDevice->FmtChans = DevFmtQuad;
else if(chancount >= 2 && (chanmask&StereoMask) == STEREO)
@@ -1421,10 +1415,6 @@ HRESULT WasapiCapture::resetProxy()
InputType.Format.nChannels = 6;
InputType.dwChannelMask = X5DOT1;
break;
- case DevFmtX51Rear:
- InputType.Format.nChannels = 6;
- InputType.dwChannelMask = X5DOT1REAR;
- break;
case DevFmtX61:
InputType.Format.nChannels = 7;
InputType.dwChannelMask = X6DOT1;
@@ -1509,7 +1499,6 @@ HRESULT WasapiCapture::resetProxy()
return (chancount == 4 && (chanmask == 0 || (chanmask&QuadMask) == QUAD));
/* 5.1 (Side) and 5.1 (Rear) are interchangeable here. */
case DevFmtX51:
- case DevFmtX51Rear:
return (chancount == 6 && (chanmask == 0 || (chanmask&X51Mask) == X5DOT1
|| (chanmask&X51RearMask) == X5DOT1REAR));
case DevFmtX61: