xbmc/xbmc — pull request #5935 by Memphiz (2014-12-11 08:50:02+00:00)
Title: [osx] - fix broken audio devices with more then 8 unknown channels in one stream

In CoreAudio we have to always deliver data for the number of channels in one stream even if not all channels are used. We normally fillup the unused channels with AE_CH_UNKNOWN. Till now the channel enum allows for only 8 unknown channels. Since one channel can only be added once in a CAEChannelInfo object this leads to the following issue.

User has an audio device with 12 channels in one stream. He sets Kodi to 2.0 output. This means we need to deliver data for FL,FR,<10 unknown channels> (12 channels in sum). Because of the limit to 8 unknown channels we deliver FL,FR,<8 unknown channels> (10 channels in sum). This leads to the fact that we deliver data for 10 channels in a sink which expects 12 channels. We have disco on all 12 channels instead of Stereo + 10 * silence...

@FernetMenta for review and risk judgement

@MartijnKaijser @topfs2 user with that audio device confirmed the fix. (i tag it for helix as a proposal and let fernet overrule if needed).