Merge pull request #4438 from fritsch/xbmc-upstream
authorTrent Nelson <trent.a.b.nelson@gmail.com>
Fri, 21 Mar 2014 18:48:01 +0000 (12:48 -0600)
committerTrent Nelson <trent.a.b.nelson@gmail.com>
Fri, 21 Mar 2014 20:06:19 +0000 (14:06 -0600)
AESinkDirectSound: Only add AC3 and DTS if we are not PCM device

xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp

index 2b57961..cd38a37 100644 (file)
@@ -548,9 +548,12 @@ void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bo
       WAVEFORMATEX* smpwfxex = (WAVEFORMATEX*)varName.blob.pBlobData;
       deviceInfo.m_channels = layoutsByChCount[std::max(std::min(smpwfxex->nChannels, (WORD) DS_SPEAKER_COUNT), (WORD) 2)];
       deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_FLOAT));
-      deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_AC3));
-      // DTS is played with the same infrastructure as AC3
-      deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_DTS));
+      if (aeDeviceType != AE_DEVTYPE_PCM)
+      {
+        deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_AC3));
+        // DTS is played with the same infrastructure as AC3
+        deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_DTS));
+      }
       deviceInfo.m_sampleRates.push_back(std::min(smpwfxex->nSamplesPerSec, (DWORD) 192000));
     }
     else