Repository: xbmc/xbmc
File: xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp (C++)

Code before:
    }
  }

  // Query RAW capabilities
  isRaw = true;
  m_info.m_deviceName = "AudioTrack (RAW)";
  m_info.m_displayName = "AudioTrack (RAW)";
  m_info.m_displayNameExtra = "Android IEC packer";
  UpdateAvailablePCMCapabilities();
  UpdateAvailablePassthroughCapabilities(isRaw);
  m_info_raw = m_info;

  // no need to display two PCM sinks - as they are the same
  if (!list.empty())
    m_info_raw.m_onlyPassthrough = true;

  list.push_back(m_info_raw);
}

void CAESinkAUDIOTRACK::UpdateAvailablePassthroughCapabilities(bool isRaw)
{
  m_info.m_deviceType = AE_DEVTYPE_HDMI;
  m_info.m_wantsIECPassthrough = false;
  m_info.m_dataFormats.push_back(AE_FMT_RAW);
  m_info.m_streamTypes.clear();
  bool supports_192khz = m_sink_sampleRates.find(192000) != m_sink_sampleRates.end();
  if (isRaw)
  {
    bool canDoAC3 = false;

    if (CJNIAudioFormat::ENCODING_AC3 != -1)
    {
      if (VerifySinkConfiguration(48000, CJNIAudioFormat::CHANNEL_OUT_STEREO,
                                  CJNIAudioFormat::ENCODING_AC3, true))
      {
        m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3);
        CLog::Log(LOGDEBUG, "Firmware implements AC3 RAW");

        canDoAC3 = true;
      }
    }

    // EAC3 working on shield, broken on FireTV
    if (CJNIAudioFormat::ENCODING_E_AC3 != -1)
    {
      if (VerifySinkConfiguration(48000, CJNIAudioFormat::CHANNEL_OUT_STEREO,
                                  CJNIAudioFormat::ENCODING_E_AC3, true))
      {
        m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_EAC3);
        CLog::Log(LOGDEBUG, "Firmware implements EAC3 RAW");


Review comment (suggestion):
```suggestion
  const bool supports_192khz = m_sink_sampleRates.find(192000) != m_sink_sampleRates.end();
```

And maybe add blank line after

Code after:
    }
  }

  // Query RAW capabilities
  isRaw = true;
  m_info.m_deviceName = "AudioTrack (RAW)";
  m_info.m_displayName = "AudioTrack (RAW)";
  m_info.m_displayNameExtra = "Android IEC packer";
  UpdateAvailablePCMCapabilities();
  UpdateAvailablePassthroughCapabilities(isRaw);
  m_info_raw = m_info;

  // no need to display two PCM sinks - as they are the same
  if (!list.empty())
    m_info_raw.m_onlyPassthrough = true;

  list.push_back(m_info_raw);
}

void CAESinkAUDIOTRACK::UpdateAvailablePassthroughCapabilities(bool isRaw)
{
  m_info.m_deviceType = AE_DEVTYPE_HDMI;
  m_info.m_wantsIECPassthrough = false;
  m_info.m_dataFormats.push_back(AE_FMT_RAW);
  m_info.m_streamTypes.clear();
  bool supports_192khz = m_sink_sampleRates.find(192000) != m_sink_sampleRates.end();

  if (isRaw)
  {
    bool canDoAC3 = false;

    if (CJNIAudioFormat::ENCODING_AC3 != -1)
    {
      if (VerifySinkConfiguration(48000, CJNIAudioFormat::CHANNEL_OUT_STEREO,
                                  CJNIAudioFormat::ENCODING_AC3, true))
      {
        m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3);
        CLog::Log(LOGDEBUG, "Firmware implements AC3 RAW");

        canDoAC3 = true;
      }
    }

    // EAC3 working on shield, broken on FireTV
    if (CJNIAudioFormat::ENCODING_E_AC3 != -1)
    {
      if (VerifySinkConfiguration(48000, CJNIAudioFormat::CHANNEL_OUT_STEREO,
                                  CJNIAudioFormat::ENCODING_E_AC3, true))
      {
        m_info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_EAC3);
        CLog::Log(LOGDEBUG, "Firmware implements EAC3 RAW");