diff options
author | Vikas Marwaha <vikasmarwaha@google.com> | 2017-09-01 22:24:41 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-09-01 22:24:41 +0000 |
commit | 1d1f1895a95322b37fd2e6f6ed783fc3dbb68459 (patch) | |
tree | 76b94f603af7b7022c039f534ff3a697eaaa5cc3 | |
parent | bf22b9c020ce446c2dbe7ade7e45aae4bd3abdc1 (diff) | |
parent | 3aef255161f9b566a0c276e40a343daf2d2ffa51 (diff) | |
download | platform_compatibility_cdd-1d1f1895a95322b37fd2e6f6ed783fc3dbb68459.tar.gz platform_compatibility_cdd-1d1f1895a95322b37fd2e6f6ed783fc3dbb68459.tar.bz2 platform_compatibility_cdd-1d1f1895a95322b37fd2e6f6ed783fc3dbb68459.zip |
Merge "Docs: Restructure Section 5.6" into oc-dev
am: 3aef255161
Change-Id: Icc5ef1462d0c49ca3d04d67712ce32d2314887ca
-rw-r--r-- | 5_multimedia/5_6_audio-latency.md | 70 |
1 files changed, 36 insertions, 34 deletions
diff --git a/5_multimedia/5_6_audio-latency.md b/5_multimedia/5_6_audio-latency.md index 88feaa42..7edea1e4 100644 --- a/5_multimedia/5_6_audio-latency.md +++ b/5_multimedia/5_6_audio-latency.md @@ -7,17 +7,18 @@ sound effects. For the purposes of this section, use the following definitions: * **output latency**. The interval between when an application writes a frame -of PCM-coded data and when the corresponding sound is presented to environment at an on-device transducer -or signal leaves the device via a port and can be observed externally. +of PCM-coded data and when the corresponding sound is presented to environment +at an on-device transducer or signal leaves the device via a port and can be +observed externally. * **cold output latency**. The output latency for the first frame, when the audio output system has been idle and powered down prior to the request. * **continuous output latency**. The output latency for subsequent frames, after the device is playing audio. -* **input latency**. The interval between when a sound is presented by environment to device -at an on-device transducer or signal enters the device via a port -and when an application reads the corresponding frame of -PCM-coded data. -* **lost input**. The initial portion of an input signal that is unusable or unavailable. +* **input latency**. The interval between when a sound is presented by +environment to device at an on-device transducer or signal enters the device via +a port and when an application reads the corresponding frame of PCM-coded data. +* **lost input**. The initial portion of an input signal that is unusable or +unavailable. * **cold input latency**. The sum of lost input time and the input latency for the first frame, when the audio input system has been idle and powered down prior to the request. @@ -29,40 +30,41 @@ output latency values. input latency values. * **continuous round-trip latency**. The sum of continuous input latency plus continuous output latency plus one buffer period. The buffer period allows -time for the app to process the signal and time for the app to mitigate phase difference -between input and output streams. +time for the app to process the signal and time for the app to mitigate phase +difference between input and output streams. * **OpenSL ES PCM buffer queue API**. The set of PCM-related -[OpenSL ES](https://developer.android.com/ndk/guides/audio/opensl/index.html) APIs -within [Android NDK](https://developer.android.com/ndk/index.html). +[OpenSL ES](https://developer.android.com/ndk/guides/audio/opensl/index.html) +APIs within [Android NDK](https://developer.android.com/ndk/index.html). * **AAudio native audio API**. The set of [AAudio](https://developer.android.com/ndk/guides/audio/aaudio/aaudio.html) APIs within [Android NDK](https://developer.android.com/ndk/index.html). -Device implementations that declare android.hardware.audio.output are STRONGLY -RECOMMENDED to meet or exceed these audio output requirements: +If device implementations declare `android.hardware.audio.output` they are +STRONGLY RECOMMENDED to meet or exceed the following requirements: + +* [SR] Cold output latency of 100 milliseconds or less +* [SR] Continuous output latency of 45 milliseconds or less +* [SR] Minimize the cold output jitter + +If device implementations meet the above requirements after any initial +calibration when using the OpenSL ES PCM buffer queue API, for continuous output +latency and cold output latency over at least one supported audio output device, +they are: -* cold output latency of 100 milliseconds or less -* continuous output latency of 45 milliseconds or less -* minimize the cold output jitter +* [SR] STRONGLY RECOMMENDED to report low latency audio by declaring +`android.hardware.audio.low_latency` feature flag. +* [SR] STRONGLY RECOMMENDED to also meet the requirements for low-latency + audio via the AAudio API. -If a device implementation meets the requirements of this section after any -initial calibration when using the OpenSL ES PCM buffer queue API, for -continuous output latency and cold output latency over at least one supported -audio output device, it is STRONGLY RECOMMENDED to report support for -low-latency audio, by reporting the feature android.hardware.audio.low_latency -via the -[android.content.pm.PackageManager](http://developer.android.com/reference/android/content/pm/PackageManager.html) -class. Conversely, if the device implementation does not meet these -requirements it MUST NOT report support for low-latency audio. +If device implementations do not meet the requirements for low-latency audio +via the OpenSL ES PCM buffer queue API, they: -Device implementations that meet the requirements for low-latency audio via -the OpenSL ES PCM buffer queue API are STRONGLY RECOMMENDED to also meet the -requirements for low-latency audio via the AAudio API. +* [C-1-1] MUST NOT report support for low-latency audio. -Device implementations that include android.hardware.microphone are STRONGLY -RECOMMENDED to meet these input audio requirements: +If device implementations include `android.hardware.microphone`, they are +STRONGLY RECOMMENDED to meet these input audio requirements: -* cold input latency of 100 milliseconds or less -* continuous input latency of 30 milliseconds or less -* continuous round-trip latency of 50 milliseconds or less -* minimize the cold input jitter + * [SR] Cold input latency of 100 milliseconds or less + * [SR] Continuous input latency of 30 milliseconds or less + * [SR] Continuous round-trip latency of 50 milliseconds or less + * [SR] Minimize the cold input jitter
\ No newline at end of file |