Permalink
Browse files

Merge pull request #4442 from FernetMenta/channels

AE: fix CAEChannelInfo::ResolveChannels, it returned duplicate channels ...
  • Loading branch information...
2 parents 0824d62 + e6401b0 commit bf140b6b49feb911d4ac10bd12f7dd75d6c2b142 @jmarshallnz jmarshallnz committed Mar 22, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
@@ -102,13 +102,13 @@ void CAEChannelInfo::ResolveChannels(const CAEChannelInfo& rhs)
}
/* we need to ensure we end up with rear or side channels for downmix to work */
- if (srcHasSL && !dstHasSL && dstHasRL)
+ if (srcHasSL && !dstHasSL && dstHasRL && !newInfo.HasChannel(AE_CH_BL))
newInfo += AE_CH_BL;
- if (srcHasSR && !dstHasSR && dstHasRR)
+ if (srcHasSR && !dstHasSR && dstHasRR && !newInfo.HasChannel(AE_CH_BR))
newInfo += AE_CH_BR;
- if (srcHasRL && !dstHasRL && dstHasSL)
+ if (srcHasRL && !dstHasRL && dstHasSL && !newInfo.HasChannel(AE_CH_SL))
newInfo += AE_CH_SL;
- if (srcHasRR && !dstHasRR && dstHasSR)
+ if (srcHasRR && !dstHasRR && dstHasSR && !newInfo.HasChannel(AE_CH_SR))
newInfo += AE_CH_SR;
// mix back center if not available in destination layout

0 comments on commit bf140b6

Please sign in to comment.