summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/TrackBase.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-05-07 09:16:09 -0700
committerGlenn Kasten <gkasten@google.com>2014-05-09 11:32:43 -0700
commitd776ac63ce9c013c9626226e43f7db606e035838 (patch)
treef75ca450359caa5a69b4124399d19d0522046826 /services/audioflinger/TrackBase.h
parent0c5b910e6eb2b9b2a622ccc0dd66e8fcae3eb28b (diff)
downloadframeworks_av-d776ac63ce9c013c9626226e43f7db606e035838.zip
frameworks_av-d776ac63ce9c013c9626226e43f7db606e035838.tar.gz
frameworks_av-d776ac63ce9c013c9626226e43f7db606e035838.tar.bz2
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
Diffstat (limited to 'services/audioflinger/TrackBase.h')
-rw-r--r--services/audioflinger/TrackBase.h6
1 files changed, 5 insertions, 1 deletions
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<IMemory>& 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<SyncEvent>& event);
+ sp<IMemory> getBuffers() const { return mBufferMemory; }
+
protected:
TrackBase(const TrackBase&);
TrackBase& operator = (const TrackBase&);
@@ -112,6 +115,7 @@ protected:
/*const*/ sp<Client> mClient; // see explanation at ~TrackBase() why not const
sp<IMemory> mCblkMemory;
audio_track_cblk_t* mCblk;
+ sp<IMemory> 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