summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-11-21 00:44:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-21 00:44:00 +0000
commit56df21d760d70a106adfbc8417b6ea179d576e24 (patch)
tree6273f4b4b81bf7000d7d1337e75d6269cb2e55d8 /include
parent7ac1df382ad86f0bc7af2c92843978ad8990eee1 (diff)
parentf8c2d1665393d8e0620a7129ef3865f34489e6ef (diff)
downloadframeworks_av-56df21d760d70a106adfbc8417b6ea179d576e24.zip
frameworks_av-56df21d760d70a106adfbc8417b6ea179d576e24.tar.gz
frameworks_av-56df21d760d70a106adfbc8417b6ea179d576e24.tar.bz2
am f8c2d166: am a7cf01da: Merge "Fix missing loop count for static tracks." into lmp-mr1-dev
* commit 'f8c2d1665393d8e0620a7129ef3865f34489e6ef': 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;
};