Move frame size out of the control block

This is part of a series to clean up the control block.

Change-Id: Ifab1c42ac0f8be704e571b292713cd2250d12a3f
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 639b567..3504f1f 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -229,7 +229,7 @@
     /* Return channelCount * (bit depth per channel / 8).
      * channelCount is determined from channelMask, and bit depth comes from format.
      */
-            size_t      frameSize() const;
+            size_t      frameSize() const { return mFrameSize; }
 
             sp<IMemory>& sharedBuffer();
 
@@ -517,6 +517,13 @@
     uint8_t                 mMuted;
     uint8_t                 mReserved;
     audio_channel_mask_t    mChannelMask;
+
+                // mFrameSize is equal to mFrameSizeAF for non-PCM or 16-bit PCM data.
+                // For 8-bit PCM data, mFrameSizeAF is
+                // twice as large because data is expanded to 16-bit before being stored in buffer.
+    size_t                  mFrameSize;             // app-level frame size
+    size_t                  mFrameSizeAF;           // AudioFlinger frame size
+
     status_t                mStatus;
     uint32_t                mLatency;