diff options
author | Andy Hung <hunga@google.com> | 2015-06-05 03:28:25 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-05 03:28:29 +0000 |
commit | 1830513e7a2638e627a7991bc0c786451eadfc0b (patch) | |
tree | 9f0f0954cdba2d3377544d36bbcf3e4ef9315369 /include | |
parent | 89d403212e2bcca78cae9c8d64621c664358ee2a (diff) | |
parent | a7f03353d5f172016f324e2a01f301cca6794152 (diff) | |
download | frameworks_av-1830513e7a2638e627a7991bc0c786451eadfc0b.zip frameworks_av-1830513e7a2638e627a7991bc0c786451eadfc0b.tar.gz frameworks_av-1830513e7a2638e627a7991bc0c786451eadfc0b.tar.bz2 |
Merge "Compute sleep time when AudioTrack client callback returns no PCM data" into mnc-dev
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioTrack.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index 3efa74c..ec16933 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -43,22 +43,30 @@ public: */ enum event_type { EVENT_MORE_DATA = 0, // Request to write more data to buffer. + // This event only occurs for TRANSFER_CALLBACK. // If this event is delivered but the callback handler - // does not want to write more data, the handler must explicitly + // does not want to write more data, the handler must // ignore the event by setting frameCount to zero. - EVENT_UNDERRUN = 1, // Buffer underrun occurred. + // This might occur, for example, if the application is + // waiting for source data or is at the end of stream. + // + // For data filling, it is preferred that the callback + // does not block and instead returns a short count on + // the amount of data actually delivered + // (or 0, if no data is currently available). + EVENT_UNDERRUN = 1, // Buffer underrun occurred. This will not occur for + // static tracks. EVENT_LOOP_END = 2, // Sample loop end was reached; playback restarted from - // loop start if loop count was not 0. + // loop start if loop count was not 0 for a static track. EVENT_MARKER = 3, // Playback head is at the specified marker position // (See setMarkerPosition()). EVENT_NEW_POS = 4, // Playback head is at a new position // (See setPositionUpdatePeriod()). - EVENT_BUFFER_END = 5, // Playback head is at the end of the buffer. - // Not currently used by android.media.AudioTrack. + EVENT_BUFFER_END = 5, // Playback has completed for a static track. EVENT_NEW_IAUDIOTRACK = 6, // IAudioTrack was re-created, either due to re-routing and // voluntary invalidation by mediaserver, or mediaserver crash. EVENT_STREAM_END = 7, // Sent after all the buffers queued in AF and HW are played - // back (after stop is called) + // back (after stop is called) for an offloaded track. #if 0 // FIXME not yet implemented EVENT_NEW_TIMESTAMP = 8, // Delivered periodically and when there's a significant change // in the mapping from frame position to presentation time. |