summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-11-20 18:36:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-11-20 18:36:27 +0000
commita7cf01da547bad8d4e66e3e4570eddeac98b6b05 (patch)
treea099a86ae62f0ea58c02c3eb61d328fab98f6c51 /include
parent574aed902443d41581684dc8bc5ddd2e067f4cdf (diff)
parentcb2129b3b568a4e31bcbda3545a468024bc972fe (diff)
downloadframeworks_av-a7cf01da547bad8d4e66e3e4570eddeac98b6b05.zip
frameworks_av-a7cf01da547bad8d4e66e3e4570eddeac98b6b05.tar.gz
frameworks_av-a7cf01da547bad8d4e66e3e4570eddeac98b6b05.tar.bz2
Merge "Fix missing loop count for static tracks." into lmp-mr1-dev
Diffstat (limited to 'include')
-rw-r--r--include/private/media/AudioTrackShared.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index fa1b20a..31dff36 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -450,7 +450,14 @@ private:
ssize_t pollPosition(); // poll for state queue update, and return current position
StaticAudioTrackSingleStateQueue::Observer mObserver;
size_t mPosition; // server's current play position in frames, relative to 0
- size_t mEnd; // cached value computed from mState, safe for asynchronous read
+
+ size_t mFramesReadySafe; // Assuming size_t read/writes are atomic on 32 / 64 bit
+ // processors, this is a thread-safe version of
+ // mFramesReady.
+ int64_t mFramesReady; // The number of frames ready in the static buffer
+ // including loops. This is 64 bits since loop mode
+ // can cause a track to appear to have a large number
+ // of frames. INT64_MAX means an infinite loop.
bool mFramesReadyIsCalledByMultipleThreads;
StaticAudioTrackState mState;
};