From d776ac63ce9c013c9626226e43f7db606e035838 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Wed, 7 May 2014 09:16:09 -0700 Subject: IAudioFlinger::openRecord returns IMemory(s) openRecord() now explicitly returns the control block and data buffer as separate IMemory references. If the IMemory for data buffer is 0, this means it immediately follows the control block. Change-Id: Ic098f88f0e037f8fbe30006689e18cacacf09d06 --- services/audioflinger/TrackBase.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'services/audioflinger/TrackBase.h') diff --git a/services/audioflinger/TrackBase.h b/services/audioflinger/TrackBase.h index 58705c4..06023fd 100644 --- a/services/audioflinger/TrackBase.h +++ b/services/audioflinger/TrackBase.h @@ -48,7 +48,8 @@ public: const sp& sharedBuffer, int sessionId, int uid, - bool isOut); + bool isOut, + bool useReadOnlyHeap = false); virtual ~TrackBase(); virtual status_t initCheck() const { return getCblk() != 0 ? NO_ERROR : NO_MEMORY; } @@ -61,6 +62,8 @@ public: int uid() const { return mUid; } virtual status_t setSyncEvent(const sp& event); + sp getBuffers() const { return mBufferMemory; } + protected: TrackBase(const TrackBase&); TrackBase& operator = (const TrackBase&); @@ -112,6 +115,7 @@ protected: /*const*/ sp mClient; // see explanation at ~TrackBase() why not const sp mCblkMemory; audio_track_cblk_t* mCblk; + sp mBufferMemory; // currently non-0 for fast RecordTrack only void* mBuffer; // start of track buffer, typically in shared memory // except for OutputTrack when it is in local memory // we don't really need a lock for these -- cgit v1.1