Fix issue 2323920: Notification & A2DP audio stutter.

Modified AudioFlinger duplicating output thread so that audio tracks are not mixed until both outputs (A2DP and hardware) have exited standby mode. This avoids to have one output far ahead of the other and audio frames dropped because the compensation mechanism cannot keep up.
Also calculate the maximum wait time in OutputTrack::write() based the on smallest frame count of all output threads instead of the frame count of the thread the OutputTrack is connected to. This avoids starving the thread with the smallest frame count by waiting too long on the other thread.
Since the frame count was reduced on hardware output to reduce latency the difference between A2DP and hardware outputs frame counts had become problematic.
Also increased the number of overflow buffers to cope with bigger timing differences among outputs.
2 files changed
tree: 9d4864f4a6ca7ba7f575a0e3db96319bb52fa7ff
  1. awt/
  2. camera/
  3. cmds/
  4. include/
  5. libs/
  6. opengl/
  7. vpn/
  8. MODULE_LICENSE_APACHE2
  9. NOTICE