Radeon-ReLive-VR icon indicating copy to clipboard operation
Radeon-ReLive-VR copied to clipboard

Audio has delay

Open itsveddy opened this issue 4 years ago • 5 comments

The image is all fine and the touch controllers too but the audio has delay when streaming steam vr games to my Quest 2. Is there a way to solve this? Maybe you made this delay intentional to compensate with video but since video has much less delay is there a way to remove it?

itsveddy avatar Jan 20 '21 15:01 itsveddy

@itsveddy - a short delay is necessary, unfortunately, to avoid audio stutter. With video, when the next frame does not arrive in time, you can repeat the previous one and not notice it. With audio, if you have a hiccup on the network, you can't replay the last sample - you would hear it right away as cracks or pops or stutter. That's why there's a bit of buffering of audio to compensate for that which leads to a short delay of about 100ms or so. There's no way around that, unfortunately.

GennadiyAMD avatar Jan 20 '21 17:01 GennadiyAMD

Oh ok thanks I'll use some bluetooth earphones then. Btw other softwares like Virtual Desktop can achieve 0 delay also on the audio side, there isn't a way you can implement this also in ReLive VR maybe changing the codec or that sort of stuff?

itsveddy avatar Jan 20 '21 19:01 itsveddy

@itsveddy - a short delay is necessary, unfortunately, to avoid audio stutter. With video, when the next frame does not arrive in time, you can repeat the previous one and not notice it. With audio, if you have a hiccup on the network, you can't replay the last sample - you would hear it right away as cracks or pops or stutter. That's why there's a bit of buffering of audio to compensate for that which leads to a short delay of about 100ms or so. There's no way around that, unfortunately.

Is the audio delay set independently of the video? Or basically if video latency is about 40ms, does audio have its own separate latency that would make it a bit higher than 40ms?

Also, is that audio delay hard-set somewhere? If so, would it be a good idea to set an overridden audio latency in games to at least that hard-set latency?

Espionage724 avatar Jan 25 '21 16:01 Espionage724

@Espionage724 - there is no special latency on audio. It just has to buffer some ms to avoid skips when there's a momentary glitch on the network that causes the next audio packet to arrive a bit late. If you don't do this, you'd get skips in audio. This buffer is what creates that additional latency.

GennadiyAMD avatar Jan 29 '21 23:01 GennadiyAMD

What about implementing audio stretching? Console emulators use this technique to compensate for lag and stutter.

pbsds avatar Feb 17 '21 01:02 pbsds