Audio Passthrough for all Programs?

I’ve been trying to figure out how to get a few of the programs that I use on my OSMC/Kodi Pi to work 100% with surround sound. I’m able to play Videos just fine with up to DTS-TrueHD audio quality through Kodi. However anything else I try, whether it be music or one of the many video apps like youtube, (or what I’ve been really trying to get working 100% with surround sound) moonlight, which is a program to do nVidia Gamestreaming to your TV. They only have Stereo sound. What I’m wondering is how Kodi is able to do audio passthrough for movies, but doesn’t do passthrough for music or any other program that is run from Kodi. Is there a Pi setting to do passthrough for everything? How exactly is that audio passthrough for movies being utilized? Cause I’d really like it to be system wide, so anything that I play gets sent to my receiver instead of being processed in the pi.

Thanks for reading. Hopefully I can get some answers soon.

This is only possible it the stream that moonlight sends is a bitstream (compressed original aufio stream).
I guess it will not pass surroubd sound because of streamsize.


Looks like work is done . But experimental.

Yes I’ve been aware that moonlight can stream 5.1 surround. However it seems to stay stuck in stereo. Also I’m not really sure if Youtube actually supports 5.1, but if it does, or if it ever will I’d like to be able to utilize that as well.

I am not sure if the moonlight versuon we use can do 5.1.

Youtube is stereo only unfortunately.