Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[WIN32][AE] fixed: supported channels should be between 2 and 8

  • Loading branch information...
commit 5f56b22502bd8887561d966e44276b008ef69022 1 parent c7d89b0
wsoltys authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
2  xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
View
@@ -603,7 +603,7 @@ void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bo
if (SUCCEEDED(hr) && varName.blob.cbSize > 0)
{
WAVEFORMATEX* smpwfxex = (WAVEFORMATEX*)varName.blob.pBlobData;
- deviceInfo.m_channels = layoutsByChCount[std::min(smpwfxex->nChannels, (WORD) 8)];
+ deviceInfo.m_channels = layoutsByChCount[std::max(std::min(smpwfxex->nChannels, (WORD) 8), (WORD) 2)];
deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_FLOAT));
deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_AC3));
deviceInfo.m_sampleRates.push_back(std::min(smpwfxex->nSamplesPerSec, (DWORD) 192000));
Please sign in to comment.
Something went wrong with that request. Please try again.