diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2014-03-11 17:12:36 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-11 17:12:37 +0000 |
commit | c644345b0b8f5292a049c4cee2bb7a2a6159b884 (patch) | |
tree | 423a2a937e693746189cf51852d0e727c418471b /include/media/AudioTrack.h | |
parent | 1ac1638077277de52d1dd4c54db71e67753f1960 (diff) | |
parent | 720ad9ddb2ac6b55b0dfbfcd2d8360151d8ac427 (diff) | |
download | frameworks_av-c644345b0b8f5292a049c4cee2bb7a2a6159b884.zip frameworks_av-c644345b0b8f5292a049c4cee2bb7a2a6159b884.tar.gz frameworks_av-c644345b0b8f5292a049c4cee2bb7a2a6159b884.tar.bz2 |
Merge "AudioTrack non-blocking write"
Diffstat (limited to 'include/media/AudioTrack.h')
-rw-r--r-- | include/media/AudioTrack.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index 7d23d02..716eaa1 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. |