diff options
author | Andy Hung <hunga@google.com> | 2015-05-31 23:22:10 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2015-06-03 13:28:27 -0700 |
commit | 08fb1743f80437c38b4094070d851ea7f6d485e5 (patch) | |
tree | 5c2c3d8a6401247415e5e106140afdea2113661f /services/audioflinger/Threads.h | |
parent | 0eafa9d8ee4069aa709ff85ceffe94d12995956d (diff) | |
download | frameworks_av-08fb1743f80437c38b4094070d851ea7f6d485e5.zip frameworks_av-08fb1743f80437c38b4094070d851ea7f6d485e5.tar.gz frameworks_av-08fb1743f80437c38b4094070d851ea7f6d485e5.tar.bz2 |
Throttle MixerThread data pull to no more than twice expected rate
This helps prevent underruns with NuPlayer and other applications
which set up buffers that are close to minimum size or use deep
buffers, and rely on a double-buffering sleep strategy to fill.
Enabled by default. Disabled by setting af.thread.throttle 0
Bug: 19062223
Bug: 21198655
Change-Id: Ia52b48e0c99588af5db53c43fede2afd775b8899
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r-- | services/audioflinger/Threads.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index 07c226e..7b4fb14 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -613,6 +613,9 @@ protected: // updated by readOutputParameters_l() size_t mNormalFrameCount; // normal mixer and effects + bool mThreadThrottle; // throttle the thread processing + uint32_t mHalfBufferMs; // half the buffer size in milliseconds + void* mSinkBuffer; // frame size aligned sink buffer // TODO: |