diff options
author | Glenn Kasten <gkasten@google.com> | 2014-09-28 14:41:07 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-10-02 16:50:26 -0700 |
commit | 4c053ea158b29fa2cdd4c6f39d3c8da4ee5a7a02 (patch) | |
tree | 129617d405d098b749beafbcd87c58321bf2b055 /services/audioflinger/Threads.h | |
parent | 8b76b592be5bc162fb5a6d7e8c47812544b6b345 (diff) | |
download | frameworks_av-4c053ea158b29fa2cdd4c6f39d3c8da4ee5a7a02.zip frameworks_av-4c053ea158b29fa2cdd4c6f39d3c8da4ee5a7a02.tar.gz frameworks_av-4c053ea158b29fa2cdd4c6f39d3c8da4ee5a7a02.tar.bz2 |
Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
The per-thread timestamp latch was not synchronized with the per-track
released frames. Now the value of each track's released frames is
latched along with the timestamp.
Bug: 17531839
Bug: 17669342
Change-Id: I9d50c8c6a5de55a3f4561ac40e20d497376c1257
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r-- | services/audioflinger/Threads.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index 7af5264..bb9aa18 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -819,8 +819,11 @@ private: struct { AudioTimestamp mTimestamp; uint32_t mUnpresentedFrames; + KeyedVector<Track *, uint32_t> mFramesReleased; } mLatchD, mLatchQ; - bool mLatchDValid; // true means mLatchD is valid, and clock it into latch at next opportunity + bool mLatchDValid; // true means mLatchD is valid + // (except for mFramesReleased which is filled in later), + // and clock it into latch at next opportunity bool mLatchQValid; // true means mLatchQ is valid }; |