From 080e2cd16f95ecdd54cbde3b15de6ff022274c66 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 16 Jun 2022 18:32:59 -0700 Subject: Match exactly 5.1 Rear in WASAPI So 7.1 and other configurations like it aren't detected as 5.1 Rear despite having side channels. --- alc/backends/wasapi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index dd928299..9007da1b 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -912,7 +912,7 @@ HRESULT WasapiPlayback::resetProxy() { const uint32_t chancount{OutputType.Format.nChannels}; const DWORD chanmask{OutputType.dwChannelMask}; - isRear51 = (chancount >= 6 && (chanmask&X51RearMask) == X5DOT1REAR); + isRear51 = (chancount == 6 && (chanmask&X51RearMask) == X5DOT1REAR); } OutputType.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; @@ -1483,7 +1483,7 @@ HRESULT WasapiCapture::resetProxy() CoTaskMemFree(wfx); wfx = nullptr; - const bool isRear51{InputType.Format.nChannels >= 6 + const bool isRear51{InputType.Format.nChannels == 6 && (InputType.dwChannelMask&X51RearMask) == X5DOT1REAR}; // Make sure buffer is at least 100ms in size -- cgit v1.2.3