oboe icon indicating copy to clipboard operation
oboe copied to clipboard

Why the "latency.msec" is not equals to input's "timestamp.latency" plus output's "timestamp.latency" in "Round Trip Latency"

Open Yahui-Li opened this issue 3 years ago • 5 comments

Android version(s): 11.0 Android device(s): HUAWEI mate 30 pro Oboe version: 1.5.1 OboeTester version 1.6.3 App name used for testing: OboeTester

Short description Why the "latency.mesc" is not equals to input's "timestamp.latency" plus output's "timestamp.latency" in "Round Trip Latency"

Steps to reproduce Just At "Round Trip Latency" Page in OboeTester App

message like below: INPUT: timestamp.latency = 8.5/11.0/13.4ms OUTPUT timestamp.latency = 3.1/5.5/7.9ms MEASURE RESULT: latency.msec = 42.65, confidence = 0.613

abviously, 13.4 + 7.9 = 21.3 != 42.65 And repeat multiple times, the result is not equal, and there has a big difference between them.

oboe_test_screenshot

Yahui-Li avatar Nov 03 '21 04:11 Yahui-Li

The timestamps reported by the device seem to be inaccurate. The app may add one burst of latency but that would only be 5 msec.

@android-usb - We should consider checking the timestamp accuracy against the measured latency in CTS Verifier.

philburk avatar Nov 07 '21 01:11 philburk

Is there has an accurate way in Android to get latency of device, no matter what OS version is?

Yahui-Li avatar Nov 08 '21 02:11 Yahui-Li

Is there has an accurate way in Android to get latency of device, no matter what OS version is?

There are three numbers in timestamp.latency. What do they refer to?

sunwell1994 avatar Jan 04 '22 19:01 sunwell1994

Is there has an accurate way in Android to get latency of device, no matter what OS version is?

did you finally found the app that you said?

NeoLc avatar Sep 27 '22 09:09 NeoLc

@YouheiLee wrote:

Is there has an accurate way in Android to get latency of device, no matter what OS version is?

You can measure Round Trip and Tap-to-Tone latency using OboeTester.

For an app, all you have is the timestamp information. You can estimate latency using calculateLatencyMillis()

Unfortunately this information is not always correct. It is often most correct for streams that would be used with playing video because A/V Sync relies on the timestamps.

@NeoLc wrote:

There are three numbers in timestamp.latency. What do they refer to?

min / average / max

OboeTester now calculates the timestamp based latency for round trip audio when it measures the actual round-trip audio. It displays both for comparison. Here is where it is calculated: https://github.com/google/oboe/blob/2ccbcca8fc2f0d791a278354836797be59743221/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp#L651

philburk avatar Oct 01 '22 21:10 philburk