roc-streaming / roc-droid

Roc for Android!
https://roc-streaming.org
Mozilla Public License 2.0
95 stars 23 forks source link

Very high latency when receiver s9+ snapdragon. #25

Open Quackdoc opened 2 years ago

Quackdoc commented 2 years ago

Hello, the android app on my S9+ has a very large amount of latency, measured when using jack_delay.

Line in - headphone direct loop using standard aux cable Line in loop = 17-18ms

ROC direct localhost loop measured acceptable, when setting sess_delay to 30ms (any lower and it stopped working consitently) ROC - Localhost loop = 45-50ms

ROC using USB tether while connecting headphone directly to line IN, ping between devices measured about 4-5ms was ludicrously high for the setup ROC - USB tether = 350-365ms average, but consistent.

as a comparison to similar real time audio setup, I tested sonobus I didn't test a localhost loop, but the monitor alone was around 42ms.

sonobus when connected via usb network, same loop with headphones and same cord sonobus - USB tether = 80-75ms with spikes to 90ms.

I unfortunately do not have any other devices to test with

gavv commented 1 year ago

Hi,

ROC using USB tether while connecting headphone directly to line IN

Can you please describe this setup in more detail? What and how do you run and connect?

Quackdoc commented 1 year ago

Hi, it's been a LONG time since I did this, but if I remeber right, I used usb tethering feature of android to create a direct LAN link between the PC and my phone, unplugged my PC from the network and disabled wifi to ensure no routing over my homes network occured. this was used to create the network connection, to send audio from the devices back and forth I connected my headphone/mic port to my PC, so the PC's line in port was connected to my headphones. so the PC was streaming audio to my phone over USB ethernet, then back to the PC via my motherboards line in (explicitly not mic in to avoid potential latency increase from additional amp circuitry).

as for testing audio, I simply used jack_delay to test for 5 minutes then got the range (I believe I used 5-95% to remove ping spikes)

at the time this was tested on a gigabyte ab350 gaming 3, over usb 3.1 gen 2 port on my PC, and my personal s9+

barolo commented 6 months ago

I can confirm this [ASUS Zenfone 8], the latency is actually higher than over wi-fi, which doesn't make any sense when connected by a 50cm cable.

Gentoo/Pipewire environment