summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2015-03-20 10:58:21 -0700
committerGlenn Kasten <gkasten@google.com>2015-03-23 14:53:01 -0700
commit3622cdff65f34a99d2f55936a895387ad41510ce (patch)
treec6af21a8fb7d4252d0ac78e542bb1baa5ae29f17 /include
parent4c36d6f48f4eecacc148317f775f65961a4f03d2 (diff)
downloadframeworks_av-3622cdff65f34a99d2f55936a895387ad41510ce.zip
frameworks_av-3622cdff65f34a99d2f55936a895387ad41510ce.tar.gz
frameworks_av-3622cdff65f34a99d2f55936a895387ad41510ce.tar.bz2
AudioRecord::read() can be non-blocking to match AudioTrack
Change-Id: I23b9466b81ab6037d0bccd5e6f5974b7bd4aeacb
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioRecord.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index c503f25..63d2e20 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -406,8 +406,11 @@ public:
* WOULD_BLOCK when obtainBuffer() returns same, or
* AudioRecord was stopped during the read
* or any other error code returned by IAudioRecord::start() or restoreRecord_l().
+ * Default behavior is to only return when all data has been transferred. Set 'blocking' to
+ * false for the method to return immediately without waiting to try multiple times to read
+ * the full content of the buffer.
*/
- ssize_t read(void* buffer, size_t size);
+ ssize_t read(void* buffer, size_t size, bool blocking = true);
/* Return the number of input frames lost in the audio driver since the last call of this
* function. Audio driver is expected to reset the value to 0 and restart counting upon