diff options
author | Glenn Kasten <gkasten@google.com> | 2014-05-13 10:41:52 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-05-22 16:19:03 -0700 |
commit | 6181ffd90a436f333c43a7f812391eee2c35005a (patch) | |
tree | 16c5649fdb1d36a0ddc8e9eb0727e622b78aff16 /services/audioflinger/TrackBase.h | |
parent | 77a3374a6170fb5f0168169bc4bc3fa9baf318eb (diff) | |
download | frameworks_av-6181ffd90a436f333c43a7f812391eee2c35005a.zip frameworks_av-6181ffd90a436f333c43a7f812391eee2c35005a.tar.gz frameworks_av-6181ffd90a436f333c43a7f812391eee2c35005a.tar.bz2 |
Allow track buffer "allocation" to be from pipe
Change-Id: Ib9ac170f8e8b7746b3588157a56cbee3b753a1cb
Diffstat (limited to 'services/audioflinger/TrackBase.h')
-rw-r--r-- | services/audioflinger/TrackBase.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/services/audioflinger/TrackBase.h b/services/audioflinger/TrackBase.h index 5f13be3..4cba3fd 100644 --- a/services/audioflinger/TrackBase.h +++ b/services/audioflinger/TrackBase.h @@ -39,6 +39,13 @@ public: STARTING_2, // for RecordTrack only }; + // where to allocate the data buffer + enum alloc_type { + ALLOC_CBLK, // allocate immediately after control block + ALLOC_READONLY, // allocate from a separate read-only heap per thread + ALLOC_PIPE, // do not allocate; use the pipe buffer + }; + TrackBase(ThreadBase *thread, const sp<Client>& client, uint32_t sampleRate, @@ -50,7 +57,7 @@ public: int uid, IAudioFlinger::track_flags_t flags, bool isOut, - bool useReadOnlyHeap = false); + alloc_type alloc = ALLOC_CBLK); virtual ~TrackBase(); virtual status_t initCheck() const { return getCblk() != 0 ? NO_ERROR : NO_MEMORY; } |