diff options
author | Eric Laurent <elaurent@google.com> | 2012-01-23 18:56:59 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2012-01-23 18:56:59 -0800 |
commit | 0609231f4fa415cc8198d706ee1c6b5f5e911023 (patch) | |
tree | d49c9a55196ca8e8517dfee39246dc222e38b20d /tools/localize/localize.h | |
parent | 0b0896555827d2a5a9c8240f27dd94e8933dd778 (diff) | |
download | frameworks_base-0609231f4fa415cc8198d706ee1c6b5f5e911023.zip frameworks_base-0609231f4fa415cc8198d706ee1c6b5f5e911023.tar.gz frameworks_base-0609231f4fa415cc8198d706ee1c6b5f5e911023.tar.bz2 |
AudioFlinger: refine mixer sleep time logic
When an AudioTrack is in underrun state, the AudioFlinger mixer will
sleep for a short period of time to give the app a chance to fill the
AudioTrack buffer. If the AudioTrack is still not ready during next mixing round,
the mixer will proceed with other tracks.
If an application keeps a steady underrun condition, the AudioFlinger mixer will
alternate between ready and not ready states. In the longer term this will cause the
audio HAL to underrun.
There is a mechanism to reduce the sleep period if the mixer is not ready several times in a
row but this mechanism is defeated by the alternating ready/not ready conditions.
The fix consists in only increasing sleep time if the mixer is ready for at least two
consecutive times.
Issue 5904527.
Change-Id: Id0139bca9be8c4e425ec6d428515c4d8f718e8c9
Diffstat (limited to 'tools/localize/localize.h')
0 files changed, 0 insertions, 0 deletions