Definition

Latency is an important system performance metric. There are many kinds of audio latency metrics. One useful and well-understood metric is round-trip latency. Round-trip latency is defined as the time it takes for an audio signal to enter the input of a mobile device, be processed by an app running on the application processor, and exit the output.

Figure 1. Round-trip audio latency on device: Toutput – Tinput

Why we measure latency

We measure and report latency so Android app developers will have the data they need to make informed decisions about available latency on actual devices. By sharing these numbers for select Nexus devices, we also hope to encourage the entire Android community to measure, publish, and reduce latency on all devices. Please join us in our commitment to reducing audio latency.

Application impact on latency

There are two kinds of delays that a signal processing stage can add to latency: algorithmic delay and computational delay. Algorithmic delay is inherent and does not vary with the CPU. An example is the delay added by a finite impulse response (FIR) filter. Computational delay is related to the number of CPU cycles required. For example, attenuation of a signal is usually done by a multiplication operation, and this multiplication will take a varying number of cycles depending on the CPU.

We measure round-trip latency via the headset connector for several reasons:

There are important music applications, such as guitar and voice processing, that use the headset connector.

Measuring round-trip latency of the on-device microphone and speaker can be cumbersome, as it is difficult to keep a feedback loop in open air from entering uncontrolled oscillation.

The on-device transducers are small and sacrifice frequency response to achieve their small size. To compensate, digital signal processing is applied but increases algorithmic delay for the on-device path.

There are cases where on-device microphone and speaker latencies do matter, but they are usually for one direction, not round-trip. Techniques for measuring unidirectional latency are described at Measuring Output Latency and Measuring Input Latency.

Figure 2. Round-trip latency via headset connector: Toutput – Tinput

Example measurements

The measurements shown are specific to a build number. Devices are listed in approximate order of initial release and within device by platform version. The test application uses the Android native audio API based on OpenSL ES.