aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-06-02 16:11:31 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-07-17 15:09:58 +0800
commitd5d06777d5f2719b0dc04da4c3cb42ee37b76365 (patch)
treeadc5cf62ddc0e85ae6f1cb11c9a3760865c568ac /docs
parentbeda94b87f617b44ac4761f4e93b95cde86a4032 (diff)
downloadndk-d5d06777d5f2719b0dc04da4c3cb42ee37b76365.tar.gz
Lower latency for AudioRecorder
Change-Id: Ibc4d89651a291a7c830761627105bfe4ac045b14
Diffstat (limited to 'docs')
-rw-r--r--docs/opensles/index.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/opensles/index.html b/docs/opensles/index.html
index d01bfb5c4..52879d02e 100644
--- a/docs/opensles/index.html
+++ b/docs/opensles/index.html
@@ -1037,6 +1037,25 @@ variance near zero, and for the handler to not block for unbounded times.
<p>
Lower latency audio is for these outputs only: on-device speaker, wired
headphones, wired headset, and line out.
+<p>
+As of API level 20, lower latency audio input is supported on select
+devices. To take advantage of this feature, first confirm that lower
+latency output is available as described above. The capability for lower
+latency output is a prerequisite for the lower latency input feature.
+Then create an AudioRecorder with the same sample rate and buffer size
+as would be used for output.
+<p>
+For simultaneous input and output, separate buffer queue
+completion handlers are used for each side. There is no guarantee of
+the relative order of these callbacks, or the synchronization of the
+audio clocks, even when both sides use the same sample rate.
+Your application should buffer the data with proper buffer synchronization.
+<p>
+One consequence of potentially independent audio clocks is the need
+for asynchronous sample rate conversion. A simple (though not ideal
+for audio quality) technique for asynchronous sample rate conversion
+is to duplicate or drop samples as needed near a zero-crossing point.
+More sophisticated conversions are possible.
<h3>Security and permissions</h3>