summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2014-02-04 11:00:59 -0800
committerJean-Michel Trivi <jmtrivi@google.com>2014-03-03 10:44:27 -0800
commit720ad9ddb2ac6b55b0dfbfcd2d8360151d8ac427 (patch)
tree58049745c0426d9b615a3891419963f2589edd7b /include
parent56df9ff31d583ad3eae4f279a3df550273c58e1e (diff)
downloadframeworks_av-720ad9ddb2ac6b55b0dfbfcd2d8360151d8ac427.zip
frameworks_av-720ad9ddb2ac6b55b0dfbfcd2d8360151d8ac427.tar.gz
frameworks_av-720ad9ddb2ac6b55b0dfbfcd2d8360151d8ac427.tar.bz2
AudioTrack non-blocking write
Bug 7531968 Change-Id: I6d0e79fa8cab5b6eb36bcc34977f4cf0d7eec8ea
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioTrack.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index d0df710..7816917 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -556,8 +556,11 @@ public:
* WOULD_BLOCK when obtainBuffer() returns same, or
* AudioTrack was stopped during the write
* or any other error code returned by IAudioTrack::start() or restoreTrack_l().
+ * Default behavior is to only return until all data has been transferred. Set 'blocking' to
+ * false for the method to return immediately without waiting to try multiple times to write
+ * the full content of the buffer.
*/
- ssize_t write(const void* buffer, size_t size);
+ ssize_t write(const void* buffer, size_t size, bool blocking = true);
/*
* Dumps the state of an audio track.