aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfritsch <Peter.Fruehberger@gmail.com>2017-07-15 09:09:35 +0200
committerfritsch <Peter.Fruehberger@gmail.com>2017-10-05 19:22:41 +0200
commit81f97f7387ebeb13506a7f4998658054a15e353f (patch)
tree42202091e76bd276876c436cf3d68a9dd32158ec
parentdeb364fe0d91a977e1af44034b43443f91859aaf (diff)
AESinkAUDIOTRACK: Workaround interpret RR and RL of CEA-861-D to map it on Android defaults
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
index 8651f7b658..3ca25324be 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
@@ -142,6 +142,15 @@ static int AEChannelMapToAUDIOTRACKChannelMask(CAEChannelInfo info)
{
info.ResolveChannels(KnownChannels);
+ // Detect layouts with 6 channels including one LFE channel
+ // We currently support the following layouts:
+ // 5.1 FL+FR+FC+LFE+BL+BR
+ // 5.1(side) FL+FR+FC+LFE+SL+SR
+ // According to CEA-861-D only RR and RL are defined
+ // Therefore we let Android decide about the 5.1 mapping
+ if (info.Count() == 6 && info.HasChannel(AE_CH_LFE))
+ return CJNIAudioFormat::CHANNEL_OUT_5POINT1;
+
int atMask = 0;
for (unsigned int i = 0; i < info.Count(); i++)