summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2015-03-24 20:41:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-24 20:41:38 +0000
commit957af4cef721c1eec1606850e77ad2ef1fd0eb0a (patch)
tree3c05978c8a584181355db31052116afcda8db5f4 /include
parent343dad3c1ffdd780bbf247ceebb1f2fd344a5d51 (diff)
parent3622cdff65f34a99d2f55936a895387ad41510ce (diff)
downloadframeworks_av-957af4cef721c1eec1606850e77ad2ef1fd0eb0a.zip
frameworks_av-957af4cef721c1eec1606850e77ad2ef1fd0eb0a.tar.gz
frameworks_av-957af4cef721c1eec1606850e77ad2ef1fd0eb0a.tar.bz2
Merge "AudioRecord::read() can be non-blocking to match AudioTrack"
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 3daac65..fce5840 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -402,8 +402,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