When playing DTS 7.1 in the 7.1 speaker configuration, all channels sound correct.
When playing DTS 5.1 in the 5.1 speaker configuration, all channels also sound correctly.
BUT when playing DTS 5.1 in the 7.1 speaker configuration, the Rear channels sound in the Side channels, and it should be the other way around.
You have to manually change the ASIO channel map specifically for DTS 5.1.
Dolby AC3 sounds correct in all configurations.
Maybe someone will be able to change the configuration to a DTS decoder?
This is FFmpeg's fault, because they explicitly signal DTS 5.1 as having side channels, not rear channels.
Standard channel layout for AC3 and DTS is 5.1 SIDE. So, actually DTS decoder is right and AC3 decoder is wrong in this case.
I'll see if I can fix the AC3 decoder, then. It's just using hard coded channel layouts with a library that doesn't provide them.