Move buffers pointer out of the control block
This is part of a series to clean up the control block.
Change-Id: Ie474557db7cb360f2d9a0f11600a68f5a3d46f07
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index 90301cd..8ef90c7 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -58,9 +58,7 @@
uint32_t userBase;
uint32_t serverBase;
- // if there is a shared buffer, "buffers" is the value of pointer() for the shared
- // buffer, otherwise "buffers" points immediately after the control block
- void* buffers;
+ int mPad1; // unused, but preserves cache line alignment
uint32_t frameCount;
// Cache line boundary
@@ -111,7 +109,10 @@
bool stepServer(uint32_t frameCount, bool isOut);
- void* buffer(uint32_t offset) const;
+ // if there is a shared buffer, "buffers" is the value of pointer() for the shared
+ // buffer, otherwise "buffers" points immediately after the control block
+ void* buffer(void *buffers, uint32_t offset) const;
+
uint32_t framesAvailableIn() { return framesAvailable(false); }
uint32_t framesAvailableOut() { return framesAvailable(true); }
uint32_t framesAvailableIn_l() { return framesAvailable_l(false); }