(2013-01-24, 01:30)Memphiz Wrote: well the hdmi/analog/optical setting is more then confusing indeed - i think you will +1 that statement too...
Yeah, it's one thing to say -1 to settings, but this one is just a silly legacy one when we already know the device type from the enumeration. And where does USB audio fit in (except to add another factor for confusion)? We already know what each device is capable of. Saying less settings is great if you have a device easily shoe-horned into three broad catagories (what the hell is analog lol - it should be PCM or "kill my passthrough" - there is no "analog" on a digital device capable of running XBMC).
m_transcode is set if output is optical and AC3 is checked - that's it. It's only set in SoftAE::LoadSettings() or its CA equivalent. If the intermediate (possibly decoded) stage is PCM and > 2,0 then it gets transcoded as "optical" cannot pass >2.0 PCM. Note that this is not even a true statement with modern optical/coax devices.
We already have a setting called multichannel LPCM. This really supercedes "optical". New "optical" or coax outputs handle multichannel PCM fine, as do USB cards. Almost all HDMI drivers (all meeting the standard) support it.
Basically no matter whether it's "analog", optical, coax, HDMI or USB, if you have multichannel LPCM checked, that's what you get, otherwise transcode. The only exception would be *none* of the options checked, then you just output PCM 2.0.
So:
2.0 PCM = 2.0 PCM on all devices
>2.0 PCM (whether native or decoded due to un-checked format like DTS)
- if multi-channel LPCM selected output multi-channel LPCM
- if multi-channel LPCM not selected and AC3 selected transcode to AC3
- if multi-channel LPCM not selected and AC3 not selected downmix to 2.0
Note that the above applies to "analog", "optical/coax", USB or HDMI equally - no setting needed.