Audioflinger intercept track retry on buffer end

Track::interceptBuffer failed to write all the audio if the source BP
could not returned the requested buffer size.
This is actually normal when the source circular buffer wraps around.

Handle it by retrying if the first buffer is too small.

Test: adb shell audiorecorder --target /data/file.raw
Bug: 111453086
Change-Id: I42a7962449a0f075909a29f5f8f5ba82ca1d0085
2 files changed