diff options
author | Andy Hung <hunga@google.com> | 2014-12-15 16:42:05 -0800 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2015-01-06 11:59:41 -0800 |
commit | 53c3b5fc1afe162a8669cb3d27d6bb14e1847e39 (patch) | |
tree | 1ccceb0cb183f01cdca8198606933b8fefc724a6 /include/media/AudioTrack.h | |
parent | 4ede21d9c1f957baf5e561849ff9bbe4bcbefc20 (diff) | |
download | frameworks_av-53c3b5fc1afe162a8669cb3d27d6bb14e1847e39.zip frameworks_av-53c3b5fc1afe162a8669cb3d27d6bb14e1847e39.tar.gz frameworks_av-53c3b5fc1afe162a8669cb3d27d6bb14e1847e39.tar.bz2 |
Improve AudioTrack EVENT_LOOP_END and EVENT_BUFFER_END accuracy
Fix timing computation to consider current position.
Fix EVENT_LOOP_END count accuracy (some could be dropped before)
for non-infinite loop static AudioTracks.
Change-Id: I255f692915b55ab6f08ccd6a2365fee3f5d0a4fe
Diffstat (limited to 'include/media/AudioTrack.h')
-rw-r--r-- | include/media/AudioTrack.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index 0f9df4f..c995bd2 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -736,6 +736,10 @@ protected: int32_t mLoopCount; // last setLoop loopCount; zero means disabled uint32_t mLoopStart; // last setLoop loopStart uint32_t mLoopEnd; // last setLoop loopEnd + int32_t mLoopCountNotified; // the last loopCount notified by callback. + // mLoopCountNotified counts down, matching + // the remaining loop count for static track + // playback. // These are private to processAudioBuffer(), and are not protected by a lock uint32_t mRemainingFrames; // number of frames to request in obtainBuffer() |