From 6181ffd90a436f333c43a7f812391eee2c35005a Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Tue, 13 May 2014 10:41:52 -0700 Subject: Allow track buffer "allocation" to be from pipe Change-Id: Ib9ac170f8e8b7746b3588157a56cbee3b753a1cb --- services/audioflinger/TrackBase.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'services/audioflinger/TrackBase.h') 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, 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; } -- cgit v1.1