Skip to content

Commit

Permalink
AESinkAUDIOTrack: Allow backported v24 API to work
Browse files Browse the repository at this point in the history
  • Loading branch information
fritsch committed Sep 14, 2016
1 parent 772a00d commit bdd1b7e
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,27 +820,24 @@ void CAESinkAUDIOTRACK::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
if (CJNIAudioFormat::ENCODING_DOLBY_TRUEHD != -1)
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_TRUEHD);
}
// Android v24 can do real IEC API
if (CJNIAudioManager::GetSDKVersion() >= 24)
// Android v24 and backports can do real IEC API
if (CJNIAudioFormat::ENCODING_IEC61937 != -1)
{
if (CJNIAudioFormat::ENCODING_IEC61937 != -1)
m_info.m_wantsIECPassthrough = true;
m_info.m_streamTypes.clear();
m_info.m_dataFormats.push_back(AE_FMT_RAW);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD_CORE);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_1024);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_2048);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_512);

if (supports_192khz)
{
m_info.m_wantsIECPassthrough = true;
m_info.m_streamTypes.clear();
m_info.m_dataFormats.push_back(AE_FMT_RAW);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD_CORE);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_1024);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_2048);
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_512);

if (supports_192khz)
{
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_EAC3);
// not working yet
// m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD);
// m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_TRUEHD);
}
m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_EAC3);
// not working yet
// m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD);
// m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_TRUEHD);
}
}
}
Expand Down

0 comments on commit bdd1b7e

Please sign in to comment.