diff options
author | Glenn Kasten <gkasten@google.com> | 2013-01-10 12:31:01 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-02-22 16:50:36 -0800 |
commit | da6ef1320d0161b1640dc84d7a9c5a25860c3619 (patch) | |
tree | 86b24f64ed0bd55de10deb193290009687886192 /services/audioflinger/Threads.cpp | |
parent | 99c2f923f6b04efffe949d1daf9cb7148e3cc201 (diff) | |
download | frameworks_av-da6ef1320d0161b1640dc84d7a9c5a25860c3619.zip frameworks_av-da6ef1320d0161b1640dc84d7a9c5a25860c3619.tar.gz frameworks_av-da6ef1320d0161b1640dc84d7a9c5a25860c3619.tar.bz2 |
Update tee sink
Implement rotation to reduce long-term storage use.
Implement optional per-track tee.
Dynamically enable at runtime based on property, instead of at compile-time.
Dynamic frame count not yet implemented.
Bug: 8223560
Change-Id: I3706443c6ec0cb0c6656dc288715a02ad5fea63a
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r-- | services/audioflinger/Threads.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index ba848d7..1209ea6 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -2124,19 +2124,19 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud (monoPipe->maxFrames() * 7) / 8 : mNormalFrameCount * 2); mPipeSink = monoPipe; -#ifdef TEE_SINK_FRAMES - // create a Pipe to archive a copy of FastMixer's output for dumpsys - Pipe *teeSink = new Pipe(TEE_SINK_FRAMES, format); - numCounterOffers = 0; - index = teeSink->negotiate(offers, 1, NULL, numCounterOffers); - ALOG_ASSERT(index == 0); - mTeeSink = teeSink; - PipeReader *teeSource = new PipeReader(*teeSink); - numCounterOffers = 0; - index = teeSource->negotiate(offers, 1, NULL, numCounterOffers); - ALOG_ASSERT(index == 0); - mTeeSource = teeSource; -#endif + if (mTeeSinkOutputEnabled) { + // create a Pipe to archive a copy of FastMixer's output for dumpsys + Pipe *teeSink = new Pipe(mTeeSinkOutputFrames, format); + numCounterOffers = 0; + index = teeSink->negotiate(offers, 1, NULL, numCounterOffers); + ALOG_ASSERT(index == 0); + mTeeSink = teeSink; + PipeReader *teeSource = new PipeReader(*teeSink); + numCounterOffers = 0; + index = teeSource->negotiate(offers, 1, NULL, numCounterOffers); + ALOG_ASSERT(index == 0); + mTeeSource = teeSource; + } // create fast mixer and configure it initially with just one fast track for our submix mFastMixer = new FastMixer(); |