Skip to content

Commit

Permalink
Merge pull request xbmc#4438 from fritsch/xbmc-upstream
Browse files Browse the repository at this point in the history
AESinkDirectSound: Only add AC3 and DTS if we are not PCM device
  • Loading branch information
t-nelson committed Mar 21, 2014
2 parents 567668a + 039f6bd commit ddb2f9e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ddb2f9e

Please sign in to comment.