From f20e1d8df84c5fbeeace0052d100982ae39bb7a4 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Fri, 12 Jul 2013 09:45:18 -0700 Subject: Rename control block server to mServer and add comments Change-Id: Ieabd91acee92d0e84e66fbd358df5282b856306e --- include/private/media/AudioTrackShared.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/private') 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) { -- cgit v1.1