Audio channel layout info label



Currently skinners only have ListItem.AudioChannels with which to work out the channel layout.

Quote:ListItem.AudioChannels
Shows the number of audio channels of the currently selected video (possible values: 1, 2, 4, 5, 6, 7, 8, 10)

And they generally use the following variable to convert this to the channel layout:

xml:
<variable name="AudioChannels">
<value condition="String.IsEqual(ListItem.AudioChannels,0)">0.0</value>
<value condition="String.IsEqual(ListItem.AudioChannels,1)">1.0</value>
<value condition="String.IsEqual(ListItem.AudioChannels,2)">2.0</value>
<value condition="String.IsEqual(ListItem.AudioChannels,3)">2.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,4)">4.0</value>
<value condition="String.IsEqual(ListItem.AudioChannels,5)">4.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,6)">5.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,7)">6.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,8)">7.1</value>
<value condition="String.IsEqual(ListItem.AudioChannels,10)">9.1</value>
<value>$INFO[ListItem.AudioChannels]</value>
</variable>

This works for the most part but there are times when this is wrong.
For example when a movie has this layout:

Code:
Channel(s) : 4 channels
Channel layout : C L R LFE

It isn’t 4.0 but instead 3.1 and the player process screen confirms this:

Image

This also confirms that Kodi extracts this information somewhere so an info label could be possible; just knowing there’s an LFE would help.