Skip to content
This repository
Browse code

Merge pull request #2576 from manio/aeremap-fix

[AE] AERemap: Fix mixing front and rear channels in some setups
  • Loading branch information...
commit 8172cd26420eddf239545fb8fa9aded2cbeb1af6 2 parents b8700a2 + ae788cf
authored April 09, 2013

Showing 1 changed file with 15 additions and 2 deletions. Show diff stats Hide diff stats

  1. 17  xbmc/cores/AudioEngine/Utils/AERemap.cpp
17  xbmc/cores/AudioEngine/Utils/AERemap.cpp
@@ -119,8 +119,21 @@ bool CAERemap::Initialize(CAEChannelInfo input, CAEChannelInfo output, bool fina
119 119
   RM(AE_CH_TFC , AE_CH_TFL, AE_CH_TFR);
120 120
   RM(AE_CH_TFR , AE_CH_FR);
121 121
   RM(AE_CH_TFL , AE_CH_FL);
122  
-  RM(AE_CH_SR  , AE_CH_BR, AE_CH_FR);
123  
-  RM(AE_CH_SL  , AE_CH_BL, AE_CH_FL);
  122
+
  123
+  // Some 5.1 Setups announce a BR and BL instead of SR and SL - put out SR and SL on those instead
  124
+  if (!m_mixInfo[AE_CH_BL].in_src && !m_mixInfo[AE_CH_BR].in_src && // make sure not to not mix 7.1 channels
  125
+      (m_mixInfo[AE_CH_SL].in_src && !m_mixInfo[AE_CH_SL].in_dst && m_mixInfo[AE_CH_BL].in_dst) &&
  126
+      (m_mixInfo[AE_CH_SR].in_src && !m_mixInfo[AE_CH_SR].in_dst && m_mixInfo[AE_CH_BR].in_dst))
  127
+  {
  128
+    RM(AE_CH_SR  , AE_CH_BR);
  129
+    RM(AE_CH_SL  , AE_CH_BL);
  130
+  }
  131
+  else
  132
+  {
  133
+    RM(AE_CH_SR  , AE_CH_BR, AE_CH_FR);
  134
+    RM(AE_CH_SL  , AE_CH_BL, AE_CH_FL);
  135
+  }
  136
+
124 137
   RM(AE_CH_BC  , AE_CH_BL, AE_CH_BR);
125 138
   RM(AE_CH_FROC, AE_CH_FR, AE_CH_FC);
126 139
   RM(AE_CH_FLOC, AE_CH_FL, AE_CH_FC);

0 notes on commit 8172cd2

Please sign in to comment.
Something went wrong with that request. Please try again.