summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-07-12 09:45:18 -0700
committerGlenn Kasten <gkasten@google.com>2013-07-30 09:24:03 -0700
commitf20e1d8df84c5fbeeace0052d100982ae39bb7a4 (patch)
tree997cd41de1adb829c194f56cf29eb02945666b94 /include/private
parenteced2daaa6c91a3731eef978ce65c6ec319c5e6a (diff)
downloadframeworks_av-f20e1d8df84c5fbeeace0052d100982ae39bb7a4.zip
frameworks_av-f20e1d8df84c5fbeeace0052d100982ae39bb7a4.tar.gz
frameworks_av-f20e1d8df84c5fbeeace0052d100982ae39bb7a4.tar.bz2
Rename control block server to mServer and add comments
Change-Id: Ieabd91acee92d0e84e66fbd358df5282b856306e
Diffstat (limited to 'include/private')
-rw-r--r--include/private/media/AudioTrackShared.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index b890180..e950b9e 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -89,8 +89,11 @@ struct audio_track_cblk_t
// The data members are grouped so that members accessed frequently and in the same context
// are in the same line of data cache.
- volatile uint32_t server; // updated asynchronously by server,
- // "for entertainment purposes only"
+ uint32_t mServer; // Number of filled frames consumed by server (mIsOut),
+ // or filled frames provided by server (!mIsOut).
+ // It is updated asynchronously by server without a barrier.
+ // The value should be used "for entertainment purposes only",
+ // which means don't make important decisions based on it.
size_t frameCount_; // used during creation to pass actual track buffer size
// from AudioFlinger to client, and not referenced again
@@ -235,7 +238,7 @@ public:
void interrupt();
size_t getPosition() {
- return mEpoch + mCblk->server;
+ return mEpoch + mCblk->mServer;
}
void setEpoch(size_t epoch) {