Compute sleep time when AudioTrack client callback returns no PCM data

Callbacks can go into a sleep-wait cycle if the client/app is unable to
deliver data.  This can happen if the buffer is large, or if
the client/app cannot keep the buffer filled, or upon a stream end condition.
We improve the sleep time computation for AudioTrack PCM callbacks.

This minimizes the number of callbacks to NuPlayerRenderer.

Bug: 21198655
Change-Id: I4247798a6638def2f0d8f1b46f60323482065cb2
2 files changed