moonlight-ios icon indicating copy to clipboard operation
moonlight-ios copied to clipboard

spatial audio headphones support

Open benjaminfrombe opened this issue 2 years ago • 12 comments

It would be great if spatial audio headphones were supported, now the headphone channels are always stereo.

benjaminfrombe avatar Nov 27 '23 12:11 benjaminfrombe

Theoretically this should be possible by requesting a 5.1 stream and then running it through Apple's spatial audio library. Multichannel streams don't have to be Dolby Audio as can be seen by playing the wave test file here: https://www2.iis.fraunhofer.de/AAC/multichannel.html. The multichannel AAC file should work as well, however as of iOS 17, multichannel AAC files don't work anymore. The iPhone still says 'spatial audio' if you go to control center, but it is played as normal stereo.

What you can already do is using Windows Sonic (free) or Dolby Atmos for headphones (paid) to create a virtual surround signal on the Windows side of your setup. As this is still a stereo signal (on a technical perspective), you can use this on your Airpods as well – just without headtracking, of course.

Danos0100 avatar Dec 27 '23 18:12 Danos0100

Some apps (like infuse) have already implemented this. When you request a 5.1 stream, your spatial audio capable headset will give you surround sound.

benjaminfrombe avatar Jan 04 '24 09:01 benjaminfrombe

Would also love to have this. Especially with the Vision Pro around the corner.

prlaodude avatar Jan 28 '24 19:01 prlaodude

Okay, so requesting a 5.1 or 7.1 stream is entirely possible and the Apple TV version of moonlight-ios uses this. However when connecting AirPod to the Apple TV, the stream remains stereo and doesn't even offer upmixing. This probably has to do with Moonlight using the opus library to decode the audio stream? D:

Danos0100 avatar Apr 06 '24 09:04 Danos0100

Would be very great feature and it will definitely increase our gaming experience

bayramog avatar Jul 12 '24 04:07 bayramog

With iPadOS 18, I believe there is an API for developers to support Spatial Audio. I hope this feature can be implemented.

I have an iPad Pro M4 running iPadOS 18 Public Beta. I could also help to test if needed.

rramnel avatar Jul 19 '24 14:07 rramnel

There is a new beta version of Moonlight that supports Spatial Audio and Head tracking for macOS running Apple Silicon. I just tried it with my AirPods Max and it works great! Link to the beta build below

https://ci.appveyor.com/project/cgutman/moonlight-qt/builds/50523331

rramnel avatar Sep 04 '24 06:09 rramnel

This should be implementable in moonlight-ios as well. Steam Link actually uses this to supply the iPhone with 5.1 and 7.1 streams that perfectly support headtracking on AirPods.

Danos0100 avatar Dec 01 '24 14:12 Danos0100

The iPadOS version already has head tracking, not sure about Spatial Audio

rramnel avatar Dec 02 '24 16:12 rramnel

Got it working. Seems like it doesn't need a recode using CoreAudio – since iOS 18, "AUDIO_CONFIGURATION_71_SURROUND" works perfectly for this. It now just requires a simple UI Switch. Will try to do it this weekend.

Danos0100 avatar Dec 06 '24 03:12 Danos0100

Got it working. Seems like it doesn't need a recode using CoreAudio – since iOS 18, "AUDIO_CONFIGURATION_71_SURROUND" works perfectly for this. It now just requires a simple UI Switch. Will try to do it this weekend.

Is this something that would work on the apple tv or you are talking about iphone app?

GersonTf avatar Dec 14 '24 10:12 GersonTf

Any update on this feature ?

Thib1404 avatar May 03 '25 22:05 Thib1404