From 83a0382dc17364567667a4e6135db43f5bd92efc Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 12 Nov 2012 07:58:20 -0800 Subject: Move frame size out of the control block This is part of a series to clean up the control block. Change-Id: Ifab1c42ac0f8be704e571b292713cd2250d12a3f --- include/private/media/AudioTrackShared.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include/private') diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h index 8ef90c7..ac5372f 100644 --- a/include/private/media/AudioTrackShared.h +++ b/include/private/media/AudioTrackShared.h @@ -77,12 +77,9 @@ public: uint32_t sampleRate; - // NOTE: audio_track_cblk_t::frameSize is not equal to AudioTrack::frameSize() for - // 8 bit PCM data: in this case, mCblk->frameSize is based on a sample size of - // 16 bit because data is converted to 16 bit before being stored in buffer + uint8_t mPad2; // unused // read-only for client, server writes once at initialization and is then read-only - uint8_t frameSize; // would normally be size_t, but 8 bits is plenty uint8_t mName; // normal tracks: track name, fast tracks: track index // used by client only @@ -111,7 +108,7 @@ public: // 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; + void* buffer(void *buffers, uint32_t frameSize, uint32_t offset) const; uint32_t framesAvailableIn() { return framesAvailable(false); } uint32_t framesAvailableOut() { return framesAvailable(true); } -- cgit v1.1