Improve audio delay
I am currently able to achieve ~60-70ms reported end to end latency in the server app, which seems about right if I have to judge by the delay between my controllers moving and the video being rendered inside the quest, but the audio itself seems to lag another 50ms behind (at least). I haven't looked into the audio streaming code as of yet, but given the work currently being done on microphone streaming I'd think you'd already be kinda familiar with it, so here are my question: is this latency something that can be improved upon? I'd expect it to be audio processing pipeline or transfer related rather than a driver limitation... Is audio data transfered as soon as it becomes available or somehow synced or interleaved when outputting video data over UDP?
My mic streaming code is primitive compared to the audio capture code. Audio is not synced with the video in any way and just send to the HMD as fast as it can be captured. I don't know if there is room for improvement and I did not have any problems so far and can not confirm a delay of another 50ms.
Maybe you should check your wifi. Some people have improved the streaming by reducing the wifi channel width from 80mhz down to 40mhz
maybe thats my problem with the mic streaming because i get 300 ms i'll drop it to 40mhz and see if the helps
i change to 40mhz and i went from 300ms to 70 thx
Changing to 40mhz didn't improve the discrepancy in latency between audio and video (received from desktop and played back on the headset). However, there is a slight drift to be noticed (sometimes the audio lags a bit more/less behind the headset video. If I listen to my desktop audio at the same time, I can clearly here the order of playback being desktop audio -> headset video -> headset audio. Changing resolution or bitrate doesn't have an impact. Increasing buffersize decreases the discrepancy a bit but it'd be more correct to say the drift seems more wild.
Games where the audio/video timing isn't a really big deal work fine, since it's only very small, for example Vivecraft. Beatsaber however requires me to play with desktop audio or take a full step backward from the center of the stage (which wouldn't be needed if video/audio where synced, you'd just notice the latency on the controllers). If I am the only one noticing, I'd guess my setup would be the reason.
If I listen to my desktop audio at the same time, I can clearly here the order of playback being desktop audio -> headset video -> headset audio.
I think here could be the problem. There will always be a delay in the streamed audio and video. Can't be avoided. For the video, the async reprojection is used to make it less noticeable, for the audio, there is no such thing. Some people are more susceptible to this than others.
In my opinion, rhythm games like beatsaber will never be a smooth and playable on any streaming solution. Its the same as back in the day of guitar hero, where you had to disable the post processing of some TVs to get a chance of playing the game. With streaming over wifi, there is nothing we can disable. I even have this delay when I play with the steam link over a ethernet connection and hear the audio from my speakers.