summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-11-20 18:39:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-20 18:39:27 +0000
commitf8c2d1665393d8e0620a7129ef3865f34489e6ef (patch)
treea099a86ae62f0ea58c02c3eb61d328fab98f6c51 /include
parent9dad026b7c69add31e1cab48774223236efe801e (diff)
parenta7cf01da547bad8d4e66e3e4570eddeac98b6b05 (diff)
downloadframeworks_av-f8c2d1665393d8e0620a7129ef3865f34489e6ef.zip
frameworks_av-f8c2d1665393d8e0620a7129ef3865f34489e6ef.tar.gz
frameworks_av-f8c2d1665393d8e0620a7129ef3865f34489e6ef.tar.bz2
am a7cf01da: Merge "Fix missing loop count for static tracks." into lmp-mr1-dev
* commit 'a7cf01da547bad8d4e66e3e4570eddeac98b6b05': Fix missing loop count for static tracks.
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;
};