diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2014-03-04 13:19:01 +1300 |
---|---|---|
committer | jmarshallnz <jcmarsha@gmail.com> | 2014-03-04 13:19:01 +1300 |
commit | f109a31fdaf5ae103446ba9f5d2f9bee43c1b22a (patch) | |
tree | 581173c0a267525a9a25777b935bc4823d67e8e3 | |
parent | 88b9a0de73cc5cfaf4be8c6e4776dae7b9d30262 (diff) | |
parent | 352d013f8dd7a43be490a2468fbcc7fd8ebd865f (diff) |
Merge pull request #4320 from Memphiz/osxsinkfinddigital
[osxsink] - detect digital outputs based on device name and make capable...
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp index a9e123dbb1..16baa0cb8f 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp @@ -123,8 +123,21 @@ static void EnumerateDevices(CADeviceList &list) format = AE_FMT_S16BE; else { + bool isDigital = CCoreAudioStream::IsDigitalOuptut(*j); + + // if it is no digital stream per definition + // check if the device name suggests that it is digital + // (some hackintonshs are not so smart in announcing correct + // ca devices ... + if (!isDigital) + { + std::string devNameLower = device.m_deviceName; + StringUtils::ToLower(devNameLower); + isDigital = devNameLower.find("digital") != std::string::npos; + } + /* Passthrough is possible with a 2ch digital output */ - if (desc.mChannelsPerFrame == 2 && CCoreAudioStream::IsDigitalOuptut(*j)) + if (desc.mChannelsPerFrame == 2 && isDigital) { if (desc.mSampleRate == 48000) { @@ -132,6 +145,10 @@ static void EnumerateDevices(CADeviceList &list) device.m_dataFormats.push_back(AE_FMT_AC3); if (!HasDataFormat(device.m_dataFormats, AE_FMT_DTS)) device.m_dataFormats.push_back(AE_FMT_DTS); + + // treat it like optical - else ActiveAE + // won't enable the pass through options in the gui + device.m_deviceType = AE_DEVTYPE_IEC958; } else if (desc.mSampleRate == 192000) { |