Permalink
Browse files

fixup PT: properly check for PT type disabling

  • Loading branch information...
1 parent 2409672 commit 3114dfb2cab94f5118c43d2bf34b862c62eb1b7c @koying committed Jan 30, 2016
Showing with 5 additions and 5 deletions.
  1. +5 −5 xbmc/cores/AudioEngine/AEFactory.cpp
@@ -179,15 +179,15 @@ bool CAEFactory::SupportsRaw(AEDataFormat format, int samplerate)
return false;
// check if the format is enabled in settings
- if ((format & ~PT_FORMAT_RAW_CLASS == AE_FMT_AC3) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_AC3PASSTHROUGH))
+ if ((((AEDataFormat)((int)format & ~PT_FORMAT_RAW_CLASS)) == AE_FMT_AC3) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_AC3PASSTHROUGH))
return false;
- if ((format & ~PT_FORMAT_RAW_CLASS == AE_FMT_DTS) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_DTSPASSTHROUGH))
+ if ((((AEDataFormat)((int)format & ~PT_FORMAT_RAW_CLASS)) == AE_FMT_DTS) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_DTSPASSTHROUGH))
return false;
- if ((format & ~PT_FORMAT_RAW_CLASS == AE_FMT_EAC3) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_EAC3PASSTHROUGH))
+ if ((((AEDataFormat)((int)format & ~PT_FORMAT_RAW_CLASS)) == AE_FMT_EAC3) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_EAC3PASSTHROUGH))
return false;
- if ((format & ~PT_FORMAT_RAW_CLASS == AE_FMT_TRUEHD) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_TRUEHDPASSTHROUGH))
+ if ((((AEDataFormat)((int)format & ~PT_FORMAT_RAW_CLASS)) == AE_FMT_TRUEHD) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_TRUEHDPASSTHROUGH))
return false;
- if ((format & ~PT_FORMAT_RAW_CLASS == AE_FMT_DTSHD) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_DTSHDPASSTHROUGH))
+ if ((((AEDataFormat)((int)format & ~PT_FORMAT_RAW_CLASS)) == AE_FMT_DTSHD) && !CSettings::GetInstance().GetBool(CSettings::SETTING_AUDIOOUTPUT_DTSHDPASSTHROUGH))
return false;
if(AE)

0 comments on commit 3114dfb

Please sign in to comment.