Skip to content

Commit

Permalink
Merge pull request xbmc#4442 from FernetMenta/channels
Browse files Browse the repository at this point in the history
AE: fix CAEChannelInfo::ResolveChannels, it returned duplicate channels ...
  • Loading branch information
jmarshallnz authored and t-nelson committed Mar 24, 2014
1 parent 878d89e commit 88679b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 88679b4

Please sign in to comment.